请朋友们帮帮忙看看,在下感激不尽.
我Mysql数据库里有我所要的字段,我在数据库下使用也查出结果,可是我在JSP中使用下面的SQL 语句,没有显示结果<BR>Class.forName("org.gjt.mm.mysql.Driver").newInstance();<BR> Connection con=java.sql.DriverManager.getConnection("jdbc:mysql://localhost/database","root","");<BR> Statement stmt=con.createStatement();<BR> ResultSet rst=stmt.executeQuery("select id from news where title='张兵'");<BR> while(rst.next())<BR> {<BR> out.println("<tr>");<BR> out.println("<td>"+rst.getString("id")+"</td>");<BR> out.println("</tr>");<BR> }<BR>朋友们帮忙解决一下页:
[1]
