UPDATE table SET d='complete' WHERE a=0 AND b=0 and c=0;

-----Original Message-----
From: Larry Brown [mailto:[EMAIL PROTECTED]
Sent: Monday, December 08, 2003 3:58 PM
To: MySQL List
Subject: if function?


Is there a way to write an if statement in mysql to affect the following?...

if field a=0,b=0,c=0 then update d='complete' 

where the table consists of...

a int(1),
b int(1),
c int(1),
d char(8)

--------------------
|a  |b  |c  |d     |
--------------------
|1  |0  |0  |null  |
|1  |1  |0  |null  |
|0  |0  |0  |null  |
--------------------

resulting with the third recode updated to show 'complete'?

TIA

Larry


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


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

Reply via email to