title: MySQL Update in While loop
body: <p>There is probably a simple solution to this but I can't figure it out:
  I'm trying to UPDATE in a While loop (from the phpMyAdmin panel):</p>
  
  <pre><code>DELIMITER $$
  CREATE PROCEDURE proc_name()
  BEGIN
  DECLARE c int ;
  SET c = 509 ;
  WHILE c&lt;637 DO
    UPDATE foobar
      SET `qwerty`= 10000+c-509
      WHERE `product_id` IS c ;
    SET c = c + 1 ;
  END WHILE;
  END $$
  DELIMITER ;
  </code></pre>
  
  <p>The error:</p>
  
  <blockquote>
    <p>..near 'c ; SET c = c + 1 ; END WHILE ; END' at line 9.</p>
  </blockquote>