Jump to content

Mysql_num_rows error...


ILYAS415

Recommended Posts

Okay when i run my script i get a serious error. The page tells me that...

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/username/public_html/game/index.php on line 23

 

Heres my query at line 22 and my function at line 23...

$user= mysql_query("SELECT * FROM `users` WHERE `username`='$username' AND `password`='$password'");
$usernum= mysql_num_rows($user);

 

The query works for me on the database when i run it but not on this script. For a test of this script go to...

THIS URL

 

I would appreciate it alot if anyone can help.

Note: Ive checked my database and all the columns and tables im looking for are valid and exist.

Link to comment
https://forums.phpfreaks.com/topic/92610-mysql_num_rows-error/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.