'How can I solve this error in SQL syntax? [closed]
I have an error with a server about a request to the DB.
This is the message: java.sql.SQLSyntaxErrorException: 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 ', regione='e', provincia='q', comune='w'' at line 1
This is the quesry SQL in question:
PreparedStatement ps = con.prepareStatement("SELECT * FROM azienda WHERE id_categoria=?,
regione=?, provincia=?, comune=?");
ps.setInt(1, id);
ps.setString(2, regione);
ps.setString(3, provincia);
ps.setString(4, comune);
Thanks in advance!
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
