title: mysql delete triggers
body: <p>I think I read that the delete trigger doesn't know what data was deleted and loops over the whole table applying the trigger. Is that true?</p>
  
  <p>Does that mean that the before delete loops over the whole table before the data is deleted and after delete loops over the whole table after the delete occurs?</p>
  
  <p>Is there no way to loop over just the deleted records? So If 10 records are deleted loop over them?</p>
  
  <pre><code>DELIMITER $$
  DROP TRIGGER  `before_delete_jecki_triggername`$$
  CREATE TRIGGER before_delete_triggername
  BEFORE DELETE ON table
  FOR EACH ROW 
  BEGIN
      /*do stuff*/
  END$$
  DELIMITER ;
  </code></pre>
  
  <p>Thanks,</p>
  
  <p>Mat</p>