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

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

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-06 09:34:441182browse

mysqlstring数据jsp

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

<code>  </code>

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

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

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

<code>         </code>

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

Statement:
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