title: mysql trigger query. Is it correct?
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/5946137/update-mysql-table-on-insert-command">Update mysql table on Insert command</a>  </p>
  </blockquote>
  
  
  
  <p>Below is the query I am using to insert a new row in send_sms table:</p>
  
  <pre><code>DELIMITER $$ 
  CREATE TRIGGER before_insert;
  
  BEFORE UPDATE ON send_sms
  
    FOR EACH ROW BEGIN 
  
      INSERT INTO send_sms 
        (sender, receiver, msgdata)
      VALUES 
        ('123456', '654321', 'hello trigger')
  
    END
  
  DELIMITER ;
  </code></pre>
  
  <p>...before an Insert query is executed on send_sms table. Am I doing it right? Because I am not getting what I want.</p>