当前位置: 技术问答>java相关
大家帮我分析以下程序!!哪里错了?
来源: 互联网 发布时间:2015-06-17
本文导语: | String sqlk,namek,qhdhk; ResultSet rsk; namek=request.getParameter("name"); // if ( namek != null ) { sqlk="select * from Royaldb.allqiuhui where qhdh='"+request.getParameter("name")+"';"; } else { String otherSql = ""; //其他...
|
String sqlk,namek,qhdhk;
ResultSet rsk;
namek=request.getParameter("name");
//
if ( namek != null )
{
sqlk="select * from Royaldb.allqiuhui where qhdh='"+request.getParameter("name")+"';";
}
else
{
String otherSql = ""; //其他条件
sqlk="select * from Royaldb.allqiuhui where 1= 1 " + otherSql ;
}
out.println(sqlk);
rsk=db.getRecord(sqlk);
qhdhk=rsk.getString("qhname");
ResultSet rsk;
namek=request.getParameter("name");
//
if ( namek != null )
{
sqlk="select * from Royaldb.allqiuhui where qhdh='"+request.getParameter("name")+"';";
}
else
{
String otherSql = ""; //其他条件
sqlk="select * from Royaldb.allqiuhui where 1= 1 " + otherSql ;
}
out.println(sqlk);
rsk=db.getRecord(sqlk);
qhdhk=rsk.getString("qhname");
|
try: