title: Error in my stored-procedure
body: <p>i have an error in my stored-procedure. I use MySql DB</p>
  
  <pre><code>SET @counter = 1;
  SET @last = 0;
  UPDATE Customer SET ordre = (IF(@last = customer_id,@counter + 1,@counter = 1)),
                   @last = customer_id
  </code></pre>
  
  <p><strong>My Error</strong></p>
  
  <blockquote>
    <p>Script line: 3    You have an error in
    your SQL syntax; check the manual that
    corresponds to your MySQL server
    version for the right syntax to use
    near '@last = customer_id ORDER BY
    customer_id' at line 2</p>
  </blockquote>