title: Getting trigger to fire conditionally (MySQL / PHP)
body: <p>I want a trigger to fire only when UPDATEs are user-initiated (not me running updates from the MySQL command line).</p>
  
  <p>What's the 'industry standard' for achieving this? I have been trying unsuccessfully to detect a variable passed in with the query (i.e. @user_update=true), but without success.  A colleague of mine suggested a way to do it would be to add a new column into the table containing the trigger: 'fire_trigger', for example. And fill this with 'true' when running the SQL from the code, and ensure that this is present in order for the trigger to fire.</p>
  
  <p>Any help much appreciated!</p>