title: MySQL Loop UPDATE data from GET
body: <p>hope you have a good day.</p>
  
  <p>I want to create procedure and set events (already done) in MySQL, the procedure is</p>
  
  <pre><code>:loop
  UPDATE tableB
  SET Status='Ex-'
  WHERE (id = '($data_from_get)'))
  :endloop
  </code></pre>
  
  <p>and the GET ($data_from_get) query is </p>
  
  <pre><code>SELECT id from tableA
  WHERE ('out_date' &gt; DATE_FORMAT(CURDATE(), '%d/%m/%Y'))
  </code></pre>
  
  <p>i just don't know how to store all GET value from tableA and make UPDATE loop to tableB like <code>foreach $data_from_get as $data_from get, do UPDATE</code></p>
  
  <p>thanks </p>