MYSQL的问题,在线等回复

yinghuaxingfu 2003-08-19 10:59:39
注:MYSQL数据库,字段actived只有两个值0和1,
第一个查询语句select count(*) from members结果是39833
第二个查询语句select count(*) from members where actived="0"结果是542
第三个查询语句select count(*) from members where actived="1"结果是39833
然后执行select * from members where actived="0" limit 541 出现结果正常
但执行select * from members where actived="0" limit 542出现错误
"Got error from table handler"
问题:actived=0的记录有542条为什么只能允许查到541条??
请高手指点,我再线等待。
...全文
108 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
yinghuaxingfu 2003-08-21
  • 打赏
  • 举报
回复
xiexie !
cshchina 2003-08-20
  • 打赏
  • 举报
回复
没错,mysql的纪录从0开始计数
select * from XXX limit 19,20;就是取的是第20条记录开始的20条记录
langjianjun 2003-08-20
  • 打赏
  • 举报
回复
limit 的记录会不会是重0开始的呢。
yinghuaxingfu 2003-08-19
  • 打赏
  • 举报
回复
上面有一个地方说错了,这个是正确的问题
注:MYSQL数据库,字段actived只有两个值0和1,
第一个查询语句select count(*) from members结果是39833
第二个查询语句select count(*) from members where actived="0"结果是542
第三个查询语句select count(*) from members where actived="1"结果是39291
然后执行select * from members where actived="0" limit 541 出现结果正常
但执行select * from members where actived="0" limit 542出现错误
"Got error from table handler"
问题:actived=0的记录有542条为什么只能允许查到541条??
请高手指点,我再线等待。

62,614

社区成员

发帖
与我相关
我的任务
社区描述
Java 2 Standard Edition
社区管理员
  • Java SE
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧