关于数据库分页

iamcyh 2002-07-19 11:05:48
代码:
try{
rsCount=statement.executeQuery(SQLStrCount);
rsCount.next();
intRowCount=rsCount.getInt(1);
rsCount.close();
intPageCount = (intRowCount+intPageSize-1) / intPageSize;//统计总页数
}catch(Exception e){}

分页程序中的intRowCount=rsCount.getInt(1);不是代表取第一栏为int的表格的值吗?
为什么能够统计总行数?
...全文
70 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
7 2002-07-19
  • 打赏
  • 举报
回复
因为他的SQLStrCount语句是类似 select count(*) as num from.......的语句吧............
7 2002-07-19
  • 打赏
  • 举报
回复
因为他的SQLStrCount语句是类似 select count(*) as num from.......的语句吧............
7 2002-07-19
  • 打赏
  • 举报
回复
因为他的SQLStrCount语句是类似 select count(*) as num from.......的语句吧............

62,614

社区成员

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

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