I am trying set variable to NULL
:
$q = NULL.",";
$q .= 'abc';
and save in to database:
mysql_query("INSERT INTO table (col_a, col_b) VALUES (".$q.")")
But this generates error message:
INSERT INTO table (col_a, col_b) VALUES (,'abc')You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ','abc')' at line 2
How to save NULL
into database from variable?