title: SQL syntax for "if exists"
body: <p>Why I'm getting this error:</p>
  <pre><code>#1064 - 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 
  'IF EXISTS(SELECT id FROM mytable WHERE id = '1')' at line 1 
  </code></pre>
  <p>My SQL query:</p>
  <pre><code>IF EXISTS(SELECT id FROM mytable WHERE id = '1')
  </code></pre>
  <p>Thanks.</p>