What is wrong with this MySQL/php code?

Glenn

Member
$result = mysql_query("SELECT * FROM subjects WHERE userid = '$user'");
if (!$result) {
echo "You have not added any subjects yet.";
}



There is nothing in the table subjects so it should give me the message. But it doesn't.

It was working but seems to have stopped without my doing anything to it.
 

moonloop

New Member
I just ran this and didn't get any errors, even after refreshing it 10 or so times. Did you get it to work yet?
 
Top