Wierd problem (to me that is)

admin

Administrator
Staff member
Okey, this is really giving me a headache!
You are the true wizards so help me please.

This works fine.

mysql_connect ($host, $username, $password) OR DIE ("Could not connect to MySQL");
mysql_select_db($database) OR DIE ("Can't select database.");

This too...

$count_users = mysql_query("SELECT count(*) FROM $table WHERE time>$nu AND day=$dag");
echo (mysql_result($count_users,0));

But this doesn't...It's the same, just another query.

$sidcheck = mysql_query("SELECT count(*) FROM $table WHERE SID=$SID");
echo (mysql_result($sid_check,0));

For this I get the error:
"Supplied argument is not a valid MySQL result resource"

But why does the first one work and NOT the second one...
Please help!!

Thanx!
 
Back
Top