title: node.js javascript mysql query wait unitl next row is inserted
body: <p>Is there are any ways to stop javascript query on mysql table and wait until next row is inserted?</p>
  
  <p>For example using function:</p>
  
  <pre><code>var query = connection.query('SELECT * FROM table');
  </code></pre>
  
  <p>I want to read all rows in table, display them and wait until next row is inserted, read inserted row and wait until other is inserted and so on...</p>
  
  <p>Basically it should read table which is updated every time other table gets update from PHP or other script (trigger events). </p>
  
  <p>I can not find any information about cursor sliding in javascript mysql query maybe there are some articles about it?</p>