edit: my table schema below is poorly normalized as suggested and I have revamped it.

edit: my table schema below is poorly normalized as suggested and I have revamped it.

Try to use mysql_num_rows() in your condition
if (mysql_num_rows($result) == 0) {
echo (" It's NULL!");
// if null, run a query!
} else {
echo (" It's not null...");
// if not null, echo back meessage saying not null.
}
EDIT: nevermind
EDIT2: Gosh, I see it now, try
$row = mysql_fetch_assoc($result);
if ($row[$userid] == NULL) {
echo (" It's NULL!");
// if null, run a query!
} else {
echo (" It's not null...");
// if not null, echo back meessage saying not null.
}
Try using mysql_num_rows() for checking how many rows are returned,
if (mysql_num_rows($result) == 0)
{
echo (" It's NULL!");
// if null, run a query!
}
else
{
echo (" It's not null...");
// if not null, echo back meessage saying not null.
}
Also, what column are you trying to select ?