I have this query:
UPDATE `terms`
SET id = '15',
taxonomy_id = '1',
parent_id = NULL,
level = 0,
position = 1,
active = '1',
time_created = '2012-05-24 09:31:12',
time_updated = '0000-00-00 00:00:00'
WHERE id = 15
And I want to set the parent_id to NULL with php, but how do I do this?
These are wrong:
$term->parent_id = 'NULL'; -> this is a string
$term->parent_id = NULL; -> this is empty
$term->parent_id = 0; -> this is an integer
parent_id = NULLwill update the field into null.