title: How to check in real-time if new row was added to MySQL table
body: <p>We have an automatic car plate reader which records plates of the cars enter to firm. My colleague asked me if we can instantly get the plate number of the car coming. The software uses MySQL and I have only database access. Cannot reach/edit PHP codes.</p>
  
  <p>My offer is to check using a query periodically. For example for 10 seconds. But in this way it is possible to miss the cars coming in 5 seconds. Then decreasing interval increases request/response count which means extra load for the server. <strong>I do not want the script to run always. It should run only a new db row added. It shows the plate and exits.</strong></p>
  
  <p>How can I get last recorded row from the db right after inserting? I mean there should be trigger which runs my PHP script after insertion. But I do not know.</p>
  
  <p>What I want is MySQL could run my PHP script after a new record.</p>