I'm having a problem where when I try to select the rows that have a NULL for a certain column, it returns an empty set. However, when I look at the table in phpMyAdmin, it says null for most of the rows.
My query looks something like this:
SELECT pid FROM planets WHERE userid = NULL
userid = ' '
SQL NULL's special, and you have to do
WHERE field IS NULL, as NULL cannot be equal to anything, including itself (ie: NULL = NULL is always false).