triggers - How to let MySQL NOW() function return the user time -
i ran tricky mysql issue.. our db using type datetime
updated_at
column, , late change timestamp
. i'm trying add trigger update updated_at
column on table changing. following did:
create trigger foo_schema.bar_datetime_trigger before update on foo_schema.bar each row set new.updated_at = now();
the now()
function here returns db time; however, want set udpated_at
user time (meaning time of user made changes table bar
). possible handle in mysql?
Comments
Post a Comment