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 '?'
出现这种错误的原因是在执行sql的时候使用了pstmt.executeQuery(sql)这个实际上是statement的方法,不支持?号占位符,所以正确的使用是pstmt.executeQuery()
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 '?'
出现这种错误的原因是在执行sql的时候使用了pstmt.executeQuery(sql)这个实际上是statement的方法,不支持?号占位符,所以正确的使用是pstmt.executeQuery()