Posted by Dave Thomas on 08/29/05 18:32
ZeldorBlat wrote:
> Either don't include them in the insert:
>
> insert into data (name, email) values ('$name', '$email')
>
> or make the variable 'null' (literally). Something like:
>
> $age = !empty($age) ? $age : 'null'; //'null' is a string containing
> the word 'null'
>
> Then do your query as before.
>
I was trying to do it without having to take it out of the query or
assign it NULL... just because there are a large number of variables
that could be empty.
[Back to original message]
|