designtrooper — 2013-07-23T15:43:49-04:00 — #1
I know more or less what is the syntax of a trigger statement(at least in theory, since I have never made use of a trigger in an app).
My question is if a trigger can cover the situation below:
Set a column value to null if the corresponding value that comes from a submitted a form is an empty string.
Can the above be achieve with a trigger?
r937 — 2013-07-23T18:46:42-04:00 — #2
if it's a submitted form, it's gotta be passing through some application language (like php)
that's where you would detect the empty string and replace it with the NULL keyword
trigger not required
designtrooper — 2013-07-24T11:39:35-04:00 — #3
You are right, I will do it the way you propose.
Nonetheless I just wanted to use a triger for learning purposes.
I will post in the PHP forums because I am having trouble achieving what I want.