Create a mysql trigger to insert data when a column updated
<pre><code>CREATE TRIGGER `update_2` 
AFTER UPDATE ON `itm_master`
FOR EACH ROW 
BEGIN
    IF NEW.transfer_status='YES' THEN
        INSERT into activity_tbl (`evnt_date`,`con_type`,`username`,`item_serial`,`item_model`,`item_type`,`to_status`)
        VALUES (now(),'Update',NEW.user,NEW.item_serial,NEW.master_item_model,NEW.master_item_type,NEW.item_status);
    END IF;
END
</code></pre>
<p>I'd like to create a trigger to insert data into activity_tbl whenever the transfer_status field updated in item_master table. I use this query but i am receiving Mysql Error</p>
<pre><code>CREATE TRIGGER `update_2` 
AFTER UPDATE ON `itm_master`
FOR EACH ROW 
BEGIN
    IF NEW.transfer_status='YES' THEN
        INSERT into activity_tbl (`evnt_date`,`con_type`,`username`,`item_serial`,`item_model`,`item_type`,`to_status`)
        VALUES (now(),'Update',NEW.user,NEW.item_serial,NEW.master_item_model,NEW.master_item_type,NEW.item_status);
</code></pre>
<p>MySQL said: Documentation</p>
<blockquote>
<h1>1064 - Erreur de syntaxe prÃ¨s de '' Ã  la ligne 7</h1>
</blockquote>