title: Create trigger to affect specific rows
body: <p>I want it to do is upon any insert of new rows or edit of existing rows on B, specific the 'last_seen' column would be updated on A.</p>
  
  <p>This is what I have so far: </p>
  
  <pre><code>CREATE TRIGGER insert_records
  AFTER UPDATE ON loan_records
  FOR EACH ROW
  Update  temp_card A
  INNER JOIN loan_records B
  SET A.last_seen = CURRENT_TIMESTAMP
  WHERE A.card_no = B.card_no
  </code></pre>
  
  <p>and this</p>
  
  <pre><code>CREATE TRIGGER insert_records2
  AFTER INSERT ON loan_records
  FOR EACH ROW
  Update  temp_card A
  INNER JOIN loan_records B
  SET A.last_seen =CURRENT_TIMESTAMP
  WHERE A.card_no = B.card_no
  </code></pre>
  
  <p>currently this updates all 'last_seen' columns in A, regardless whether or not they've been updated.</p>