title: SQL Query works in workbench but gives syntax error in java
body: <p>I ran the query in both sql Workbench and in the executeUpdate() method in java:</p>
  
  <p>in Workbench:</p>
  
  <pre><code>INSERT INTO recentsearches (name) VALUES ("blah");
  </code></pre>
  
  <p>in java:</p>
  
  <pre><code>statement.executeUpdate("INSERT INTO recentsearches (name) VALUES (\""+name+"\""));
  </code></pre>
  
  <p>Assuming name = "blah". But I get a syntax error from running the query in java, I've already checked the string value for name. It definitely comes up as "blah", and I didn't forget the speech marks around string values, yet I still get a syntax error.</p>
  
  <p>The error I get in my console is:</p>
  
  <blockquote>
    <p>check the manual that corresponds to your MySQL server version for the
    right syntax to use near '' at line 1</p>
  </blockquote>