急求大神教一个问题

weixin_42428355 2018-06-10 03:47:31
ResultSet rs = stmt.executeQuery("select seat_num,times from sys.seat_selection where sno = '"+sno+"' and data ='"+time+"' and times>="+hour);
Log.d(TAG, "Onclick0:获取数据成功"+"select seat_num,times from sys.seat_selection where sno = '"+sno+"' and data ='"+date+"' and times>="+hour);
if(rs.next()){
Log.d(TAG, "Onclick0: 进入循环");
}else{
Log.d(TAG, "Onclick0: wei进入循环");
}
通过jdbc数据库连接成功,try、catch语句没有捕获错误,sql语句在数据库里执行有两行结果集返回,在执行rs.next()是为false,也就是直接执行的else的内容,想问一下为什么
...全文
787 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
weixin_42428355 2018-06-10
  • 打赏
  • 举报
回复
已经解决(凑满6个字符)
weixin_42428355 2018-06-10
  • 打赏
  • 举报
回复
select seat_num,times from sys.seat_selection where sno = '1' and data ='2018-06-10' and times>=7,这是执行后Log显示的代码转换后的sql语言,没有中文转换什么的

80,351

社区成员

发帖
与我相关
我的任务
社区描述
移动平台 Android
androidandroid-studioandroidx 技术论坛(原bbs)
社区管理员
  • Android
  • yechaoa
  • 失落夏天
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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