How about

  UPDATE table
  SET bounce_count = bounce_count+1,
      status = if(bounce_count > 9, 'bounced_out', status)
  WHERE ...;

Michael

Scott Haneda wrote:
I need to do a certain update based on a condition:

MySql4

Update table set bounce_count = bounce_count+1 is the basic query, somewhere
in there I need to only do a if bounce_count+1 > 10 then update status =
'bounced_out'


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]



Reply via email to