title: MySQL Trigger with Sequel Pro
body: <p>This is my first attempt at using triggers, and I just made something quickly for test, but it gives me an error. Here is my trigger (set for AFTER INSERT)</p>
  
  <pre><code>IF NEW.controller = 'index' THEN
      SET @controller = 'index';
  ELSE
      SET @controller = 'other';
  END IF;
  
  INSERT INTO 'logs'
      ( staff_id, table_name, table_id, controller )
  VALUES
      ( NEW.staff_id, 'acl', NEW.id, @controller );
  </code></pre>
  
  <p>I get the following error:</p>
  
  <blockquote>
    <p>MySQL said: You have an error in your SQL syntax; check the manual
    that corresponds to your MySQL server version for the right syntax to
    use near 'INSERT INTO 'logs'  ( staff_id, table_name, table_id,
    controller ) VALUES   ( NEW' at line 7</p>
  </blockquote>
  
  <p>What is the matter?</p>