社区
Web 开发
帖子详情
sqlRst="select * frokm food where id='"+x+"' and name='"+y+"' and age='"+y+"'"哪里有错阿?
jamescheng
2002-05-08 05:19:34
sqlRst="select * frokm food where id='"+x+"' and name='"+y+"' and age='"+y+"'"哪里有错阿?
错误类型: 语法错误! 'and'附近
...全文
37
4
打赏
收藏
sqlRst="select * frokm food where id='"+x+"' and name='"+y+"' and age='"+y+"'"哪里有错阿?
sqlRst="select * frokm food where id='"+x+"' and name='"+y+"' and age='"+y+"'"哪里有错阿? 错误类型: 语法错误! 'and'附近
复制链接
扫一扫
分享
转发到动态
举报
AI
作业
写回复
配置赞助广告
用AI写文章
4 条
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
js_ning_cn
2002-05-11
打赏
举报
回复
sqlRst="select * frokm food where id='"+x+"' and name='"+y+"' and age='"+y+"'"
就是这里了
name='"+y+"' and age='"+y+"'"
name varchar2
age number
y 是什么类型的呢,类型不匹配,当然出错了
microsoft_windows
2002-05-08
打赏
举报
回复
有谁的名字和年龄是一样的?
最后一个and应该是or
再后面再加上 and id='"+x+"'"
Bogues
2002-05-08
打赏
举报
回复
:)
可乐加水
2002-05-08
打赏
举报
回复
sqlRst="select * frokm food where id='"+x+"' and name='"+y+"' and age='"+y+"'"
from写成frokm 了还看不出来?
还有,如果id,age是整型的话是不能加单引号的
Web 开发
81,117
社区成员
341,739
社区内容
发帖
与我相关
我的任务
Web 开发
Java Web 开发
复制链接
扫一扫
分享
社区描述
Java Web 开发
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
暂无公告
试试用AI创作助手写篇文章吧
+ 用AI写文章