Home > Database > Mysql Tutorial > string-mysql使用jsp中变量为查询条件

string-mysql使用jsp中变量为查询条件

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-06 09:34:44
Original
1181 people have browsed it

mysqlstring数据jsp

小的刚学jsp,希望各位网友多多指教。
问题是这样的:
b.jsp 从a.jsp接收了一个变量 txtMsg
已经输出验证txtMsg接收成功。

<code>  </code>
Copy after login

接下来想使用这个txtMsg作为sql查询的条件

<code>  ResultSet rs=stmt.executeQuery("select name from product where picture=‘“+txtMsg+”’");</code>
Copy after login

但在页面上却不显示数据。。。也不报错。。实在苦恼

<code>         </code>
Copy after login

请大家帮忙看看是哪里出错啦~
万分感谢

Related labels:
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template