我試圖做到以下幾點:的executeUpdate和CURDATE()
statement.executeUpdate("INSERT INTO PlayerList (nickname, uuid, firstjoined) VALUES ('" + nickName + "','" + uuid + ",' CURDATE())");
但我不斷收到:
com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException:
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 'CURDATE())' at line 1
誰能解釋是什麼原因造成的錯誤。
請參數化您的查詢! – waka