title: java sql syntax error insert into
body: <p>I have problems running this sql statement. It works fine if I run it in mysql but in java I get this error:   </p>
  
  <pre><code>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
  </code></pre>
  
  <p>The database has an id(pk) autogenerated, varchar, int, varchar;</p>
  
  <p>Can someone help me? </p>
  
  <pre><code>int i = statement.executeUpdate("INSERT INTO sala values('','"+ nume.getText() + "', "+ Integer.parseInt(capacitate.getText())+ ", '" + sunet.getText()+"'");
  </code></pre>