[eluser]TheFuzzy0ne[/eluser]
Hi everyone. How do I add a NULL value into a database table? Using PHP's NULL causes an error, using an empty string inserts, well, an empty string, and using 'NULL' inserts a string.
Many thanks in advance.
EDIT: It would appear that I've answered my own question. PHP NULL is converted by the active record class when inserting and updating, however, I don't know how to SELECT a row WHERE a specific field equals NULL. This throws a database error telling me the WHERE clause is invalid
Code:
SELECT *
FROM table
WHERE field !=
LIMIT 1;