title: Call a stored procedure for each row returned by a query in MySQL
body: <p>I want a MySQL stored procedure which effectively does:</p>
  
  <p><code>foreach id in (SELECT id FROM objects WHERE ... ) CALL testProc(id)</code></p>
  
  <p>I think I simply want the MySQL answer to this question but I don't understand cursors well: <a href="https://stackoverflow.com/questions/886293/how-do-i-execute-a-stored-procedure-once-for-each-row-returned-by-query">How do I execute a stored procedure once for each row returned by query?</a></p>