title: Multiple insert/update statements inside trigger?
body: <p>Just a quick question that no doubt someone out there will know the answer to.</p>
  
  <p>I need to be able to do multiple insert/updates within a trigger. Every attempt ends with failure :(</p>
  
  <pre><code>DROP TRIGGER IF EXISTS `Insert_Article`//
  CREATE TRIGGER `Insert_Article` AFTER INSERT ON `Article`
   FOR EACH ROW insert into FullTextStore (`Table`, `PrimaryKey`, `ColumnName`, `Data`, `Created`) values ('Article', NEW.ArticleID, 'Description', NEW.Description, UNIX_TIMESTAMP())
  //
  </code></pre>
  
  <p>At the moment, the above simply inserts a row into a table when the parent table inserts. This works fine.</p>
  
  <p>To get this to work with mulitple values I need to do </p>
  
  <pre><code>DROP TRIGGER IF EXISTS `Insert_Article`//
  CREATE TRIGGER `Insert_Article` AFTER INSERT ON `Article`
   FOR EACH ROW insert into FullTextStore (`Table`, `PrimaryKey`, `ColumnName`, `Data`, `Created`)
  select 'Article', NEW.ArticleID, 'Description', NEW.Description, UNIX_TIMESTAMP()
  union
  select 'Article', NEW.ArticleID, 'Keywords', NEW.Keywords, UNIX_TIMESTAMP()
  //
  </code></pre>
  
  <p>But... There must be an easier way? When I try using ; to terminate each statement, it fails with </p>
  
  <pre><code>1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL version for the right syntax to use near 'select 'Article', NEW.ArticleID, 'Keywords', 'NEW.Keywords, UNIX_TIMESTAMP())' at line 1
  </code></pre>
  
  <p>I can't even get multiple update statements to work.</p>
  
  <p>It'd be a great help if anyone could point out what i'm doing wrong?</p>
  
  <p>Cheers</p>
  
  <p>Gavin</p>