List:General Discussion« Previous MessageNext Message »
From:(Hal Date:June 22 2012 12:04am
Subject:Re: Triggers and column names
View as plain text  
>>>> 2012/06/21 17:06 -0500, Gael Martinez >>>>
I'm getting that done today thru a large static trigger script and I would
like something more dynamic...
<<<<<<<<
For that it is needful to look up the table in INFORMATION_SCHEMA.COLUMNS, and, yes, you
can look up the field names--but then what will you do with the character strings that
are the field names? use PREPARE and EXECUTE for the comparisons, being ware of NULL?

In MySQL help it is written that for its own purposes MySQL actually tracks all the
information that you crave, but it nowhere is written that a BEFORE-UPDATE trigger can
make use of it. Maybe UDF, but I know naught about that.

Since BEFORE is called on every attempt, successful or not, maybe AFTER would be better.

Thread
Triggers and column namesGael Martinez21 Jun
  • Re: Triggers and column nameshsv22 Jun
    • RE: Triggers and column namesRick James22 Jun
      • Re: Triggers and column namesGael Martinez23 Jun