[eluser]comex[/eluser]
"Inserting NULL directly to MySQL works" - quoted from my op.
There is nothing in the schema that prevents setting a column as null, no "not null" declarations.
The tables are defined along the usual line: "CREATE TABLE TABLENAME( ... );
All columns are defined along this line: "ID_PAR INT(5)"
In line with the above quote the following works as desired: "UPDATE TABLENAME SET ID_PAR=NULL;"
Describing the table tells me that it allows null on most columns(the ones I'm interested in NULLing.)
As for 'mysqli', its the 'dbdriver' in database.php.
I am fairly sure that this is not an MySQL-error, I believe the problem lies with how my PHP-code interracts with MySQL.
The PHP-code is worked up in my own little 'framework' so it's hard to post it all at once =)
But it's working for everything but setting NULL. The corresponding code would be:
$this->db->set(array('ID_PAR'=>'NULL'))->where( ... )->update('MYTABLE');
Replacing 'NULL' with NULL or '' produces the same result.
Whats customary to use? 'NULL', NULL, '' or something completely different? =)