MySQL Forums
Forum List  »  Newbie

Getting error in mysql_num_rows()
Posted by: Bharati Raul
Date: April 05, 2005 10:27PM

Hi,

I am facing problem in mysql_num_rows() function.

Following is the code :

$query="SELECT * FROM tbl_name where email='$email'";
$result=mysql_query($query);
$num=mysql_num_rows($result);

This code is working fine when I am testing in a single file,
but when I am including this file in some other file, then I am getting error following error.

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /web/development/usr/local/etc/httpd/htdocs/... on line 45

Give me the solution...

Options: ReplyQuote


Subject
Written By
Posted
Getting error in mysql_num_rows()
April 05, 2005 10:27PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.