title: Mysql trigger variable - find updating user
body: <p>I have table with fields:</p>
  
  <ol>
  <li>id</li>
  <li>data1</li>
  <li>data2</li>
  </ol>
  
  <p>next I want to set trigger that after update would write to log table changes:</p>
  
  <pre><code>CREATE TRIGGER `update_data` AFTER UPDATE on `data_table`
  FOR EACH ROW
  BEGIN
     IF (NEW.data1 != OLD.data1) THEN
         INSERT INTO data_tracking set old_value = OLD.data1, new_value = NEW.data1, field = "data1";
     END IF;
     -- similar for data2
  END$$
  </code></pre>
  
  <p>I also want to record in data_tracking table user that made change, however this user is not part of original UPDATE that trigger the trigger. I it a way to let trigger know what user need to be recorded ?</p>
  
  <p>This is PHP based web service with multiple registered users, that can make changes to record via website - those user i would like to add to trigger. </p>