NutzCN Logo
问答 Cnd条件加limit() 方法显示不出来 limit 0,2
发布于 2910天前 作者 qq_2a1c6850 2471 次浏览 复制 上一个帖子 下一个帖子
标签:

大神您好
Cnd c =Cnd.where("status", "=", 0).limit(0, 2);
c显示出来的只有 where stats=0 没有后面的 LIMIT 0, 10

我就想实现 where status=2 LIMIT 0, 10或者where status=2 LIMIT 10
就可以 请帮忙解答下 谢谢

3 回复

分页的页数, 大于0才有效. 要取前10条, 写第一页不就好了

Java语句:

dao.query(UserProfile.class, Cnd.where("age", "<", 25).limit(1, 10));

输出

17:53:51.095 DEBUG (NutDaoExecutor.java:211) _runSelect - SELECT * FROM t_user_profile  WHERE age<? LIMIT 0, 10 
    |  1 |
    |----|
    | 25 |
  For example:> "SELECT * FROM t_user_profile  WHERE age<25 LIMIT 0, 10 "
添加回复
请先登陆
回到顶部