我的java/jdbc代码有问题。查询JDBC Java
参数索引超出范围(2号中的哪一个参数1)
代码:
Connection c = null;
MySQL MySQL = new MySQL(Host, Port, Database, Username, Password);
c = MySQL.open();
Player player = (Player) sender;
String zapytanie = "UPDATE `?` SET `tag`=? WHERE `name`='?';";
PreparedStatement ps = c.prepareStatement(zapytanie);
ps.setString(1, Tabel);
ps.setString(2, red);
ps.setString(3, player());
ps.executeUpdate(); //Executes the query
ps.close(); //Closes the query
c.close();
难道这有什么做的'引号? – austin