精品偷拍一区二区三区,亚洲精品永久 码,亚洲综合日韩精品欧美国产,亚洲国产日韩a在线亚洲

  • <center id="usuqs"></center>
  • 
    
  • java.sql.SQLException:Parameter index out of range (1 > number of parameters,which is 0).

    java.sql.SQLException:Parameter index out of range (1 > number of parameters,which is 0).
    private int check(String user_name,String user_code) throws SQLException {
    \x05\x05// TODO Auto-generated method stub
    \x05\x05PreparedStatement stmt = null;
    \x05String sql ="select * from log where name='?' and code='?';";
    \x05stmt = Server.con.prepareStatement(sql);
    \x05stmt.setString(1,user_name);
    \x05stmt.setString(2,user_code);
    \x05if(stmt.executeQuery(sql)==null){
    \x05\x05return 0;
    \x05}
    \x05 return 1;
    \x05}
    其他人氣:251 ℃時間:2020-05-30 15:06:39
    優(yōu)質(zhì)解答
    String sql ="select * from log where name='?' and code='?';";改成
    String sql ="select * from log where name=?and code=?“;You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '? and code=?' at line 1String sql ="select * fromlog where name=? and code=?";
    我來回答
    類似推薦
    請使用1024x768 IE6.0或更高版本瀏覽器瀏覽本站點,以保證最佳閱讀效果。本頁提供作業(yè)小助手,一起搜作業(yè)以及作業(yè)好幫手最新版!
    版權(quán)所有 CopyRight © 2012-2024 作業(yè)小助手 All Rights Reserved. 手機(jī)版