title: PHP + MySQL Queue
body: <p>I need a simple table that acts as a Queue.
  My MySQL server restriction is I can't use InnoDB tables, only MyISAM.</p>
  
  <p>Clients/workers will work at the same time and they will need to receive differents jobs each time.</p>
  
  <p>My idea is to do the following (pseudo-code):</p>
  
  <pre><code>$job &lt;- SELECT * FROM queue ORDER BY last_pop ASC LIMIT 1;
  UPDATE queue SET last_pop WHERE id = $job-&gt;id
  return $job
  </code></pre>
  
  <p>I had tried table lock and "GET_LOCK" but nothing happends, workers sometimes receives same jobs.</p>