You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
NutDao.count(tableName, cnd)得到的是某个查询的分页总数,实际生成的sql应该是select count() from tableName where cnd.... 以此为前提:那么,当cnd =“ 1=1 ” 时,生成的sql为 “select count() from tableName where 1=1 ”这个很容易理解,但是,当cnd = " 1=1 group by name "时,生成的sql就是“select count() from tableName where 1=1 group by name”,这样查询出来的结果是不对的,假如表中有10个不一样的name,count出来就是1,事实用户想要的结果可能是"select count() from (select count(*) from tableName where 1=1 group by name)" (注1),那么我想请问一下,当sql是group by时,我想要注1这样的结果,需要调用哪个方法呢?
The text was updated successfully, but these errors were encountered: