當(dāng)我查詢的數(shù)據(jù)只有一條時(shí)就出現(xiàn)以下問題
SQLSTATE: 42000?
SQL Error: 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 '' at line 1
Error SQL:SELECT * FROM userinfo WHERE userId=?
SQLSTATE: 42000?
SQL Error: 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 '' at line 1
Error SQL:SELECT * FROM user WHERE userId=?
SQLSTATE: 42000?
SQL Error: 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 '' at line 1
Error SQL:SELECT * FROM userinfo WHERE userId=?
SQLSTATE: 42000?
SQL Error: 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 '' at line 1
Error SQL:SELECT * FROM user WHERE userId=?
2017-09-12
SQL語句有問題,最大的可能原因就是最后的userId后面的字段格式和內(nèi)容。