Re: MySQL Conditional Trigger
| From: | Dee Ayy | Date: | Fri, 31 Oct 2008 18:07:36 +0000 |
| Subject: | Re: MySQL Conditional Trigger | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-45578@lists.php.net to get a copy of this message | ||
On Fri, Oct 31, 2008 at 11:09 AM, Dee Ayy <dee.ayy@gmail.com> wrote:
> ...
> IF OLD.ShipDate != NEW.ShipDate AND NEW.ShipDate IS NOT NULL THEN
> ...
The following seems to work. Is it correct and not too verbose?
IF (OLD.StatusShipDate IS NULL AND NEW.StatusShipDate IS NOT NULL) OR
(OLD.StatusShipDate != NEW.StatusShipDate AND NEW.StatusShipDate IS
NOT NULL) THEN