Hi,
I have some php code where I MUST set a variable before the insert statement to null so that it inserts NULL into a column in a mySQL database
Right now I've tried a buch of stuff and none of it works including
$my_var = null; //doesn't work
$my_var = ""; //doesn't work
$my_var = "'null'"; //doesn't work
Then... a few lines later I have my insert statement
..."VALUES('$some_var', '$my_var', '$another_var'"...etc.
Is there any way to declare a php variable as null, and then use it in single quotes with an insert statement and actually insert a mySQL null value into the column
????????????????
I DO NOT want to have to change my insert statement,
I MUST keep the var in single quotes...
Any experienced help would be appreciated!!
Vmusic