Mysql current date trigger -


I have the following triggers

  create triggers `` qc_date_trigger` after updating ` Reserve for each line on the brand 'if new. Brands QC = '1' then set @ brandxDATE = kurt (); ELSE SET @brandQCDate = NULL; end if; END   

For some reason this does not update my date field in the current date when QC = 1. I have checked the mysql doctor and it should work. Any ideology?

If your column is named brandQCDate, remove @ Please give it. @ creates a user-defined variable, not a column, besides this you want to do this before a UPDATE trigger. Update the 'brand' for each line before updating to the

  create trigger 'brand` if the new one is new. Brands QC = 1 'then set NEW.brandQCDate = CURDATE (); ELSE SET NEW.brandQCDate = NULL; end if; END    

Comments

Popular posts from this blog

Pass DB Connection parameters to a Kettle a.k.a PDI table Input step dynamically from Excel -

multithreading - PhantomJS-Node in a for Loop -

c++ - MATLAB .m file to .mex file using Matlab Compiler -