Forum Moderators: open

Message Too Old, No Replies

conditional update

         

NomikOS

6:27 am on Aug 9, 2008 (gmt 0)

10+ Year Member



if we have a table innodb unsigned int:
the query "UPDATE table SET total=total-1 ... " cause error if total <=0

how to make a conditional update in one query?

TIA

NomikOS

6:56 pm on Aug 9, 2008 (gmt 0)