社区
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'附近
...全文
33
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是整型的话是不能加单引号的
jsp 分页代码大全
/*
sql
="
select
*from ta,tb where
id
like'%"+search+"%'";
sql
=
sql
+"or title like'%"+search+"%'";
sql
=
sql
+"or time like'%"+search+"%'";
sql
=
sql
+"or con like'%"+search+"%'";
sql
=
sql
+"order by
id
";*/ ...
目前最好的JSP分页
String str
SQL
= "
SELECT
name,
age
FROM test"; // 查询执行与记录集获取 ResultSet
sql
Rst
=
sql
Stmt.executeQuery(str
SQL
);
sql
Rst
.last(); int RowCount =
sql
Rst
.getRow(); // 计算总页数 int P
age
Count = ...
一个JAVA分页方法
str
SQL
= "
select
name,
age
from test";
sql
Rst
=
sql
Stmt.executeQuery(str
SQL
);
sql
Rst
.last(); int RowCount =
sql
Rst
.getRow(); int P
age
Count = (int) (RowCount + intP
age
Size - 1) / intP
age
Size; if...
目前最好的分页技术 JSP
String str
SQL
= "
select
name,
age
from test"; // 执行
SQL
语句并获取结果集 ResultSet
sql
Rst
=
sql
Stmt.executeQuery(str
SQL
); // 获取记录总数
sql
Rst
.last(); int RowCount =
sql
Rst
.getRow(); // 记算总...
jsp分页技术
String str
SQL
= "
select
* from etsa"; ResultSet
sql
Rst
=
sql
Stmt.executeQuery(str
SQL
); ``` 5. **计算总页数和当前页**: - 获取总记录数: ```java
sql
Rst
.last(); // 光标移动到最后一条记录 int...
Web 开发
81,122
社区成员
341,744
社区内容
发帖
与我相关
我的任务
Web 开发
Java Web 开发
复制链接
扫一扫
分享
社区描述
Java Web 开发
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
暂无公告
试试用AI创作助手写篇文章吧
+ 用AI写文章