In MySQL null can have a special meaning, like triggering an auto-incremented field or resetting a timestamp. It doesn't accept a null value for a field unless you specifically tell it to.
Here is a table with the creation of a field that does accept null values:
CREATE TABLE `null_test` (
`null_field` TEXT
);
INSERT INTO `null_test` VALUES(null);
Just inserts an empty row into that table.
UPDATE `null_test` SET `null_field` = null;
Updates `null_field` in all rows in the table to null.
CREATE TABLE `null_test` (
`null_field` TEXT NOT NULL
);
Creates the same table but does not allow null values!
MySQL comes back with the error:
#1048 - Column 'null_field' cannot be null
So having said all that, in answer to your question:
Quote:
quote:
Looked in both PHP reference and MySQL reference, and don't see the syntax to use to set a database field to the value of NULL, using the SET field=value form of the SQL syntax.
|
its `field_name` = null
: )
Rich
:::::::::::::::::::::::::::::::::
Smiling Souls
http://www.smilingsouls.net
:::::::::::::::::::::::::::::::::