title: mysql delete if exists
body: <p>how can I delete if the row exists like this select statement. I tried replacing select with delete but it didn't work. 
  I a need statement that deletes and return 1 if the row exists. Or it returns 0 if the row is not found in the table.</p>
  
  <pre><code>SELECT IF ( EXISTS (SELECT * FROM `cancellation` WHERE `ID`=2), 1, 0)  
  </code></pre>