MySQL Forums
Forum List  »  Triggers

Need Help with TRIGGER and IF
Posted by: James House
Date: October 23, 2012 10:17AM

I have a PHP app that inserts 'Pass', 'Fail' or 'NA' into fields TEST1, TEST2, TEST3... through TEST15.

I have a field called OVERALL that needs to be automatically updated with 'FAIL' if any of the TEST1-TEST15 fields contains 'Fail'.

I'm pretty sure I need to use a trigger containing the update statement and either CASE or IF, but I haven't been able to nail down the exact syntax.

Can anyone please help a MySQL noob? I'm using MySQL Server version: 5.1.63-0+squeeze1 (Debian).

Options: ReplyQuote

Written By
Need Help with TRIGGER and IF
October 23, 2012 10:17AM
October 23, 2012 11:50AM
October 23, 2012 01:53PM
October 23, 2012 03:58PM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.