Re: mysql_num_rows

From: Date: Sat, 16 Aug 2003 01:25:55 +0000
Subject: Re: mysql_num_rows
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-159777@lists.php.net to get a copy of this message
John Taylor-Johnston wrote:
My question got buried on the bottom of the thread. Sorry for the repeat. I'm getting this message: Warning: Supplied argument is not a valid MySQL result resource in /.../testals.php on line 189
Read with me. Supplied argument ($news) is not a valid MySQL result resource.
189> if (mysql_num_rows($news) == 1) Ideas? $server = "localhost"; $user = "****"; $pass = "****"; $db = "redwards"; $table = "testals"; $myconnection = mysql_connect($server,$user,$pass); mysql_select_db($db,$myconnection); $news = mysql_query("select StudentId from $table where StudentID = $StudentID");
$news is not valid, therefore your query failed. Use mysql_error() to find out why. -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ PHP|Architect: A magazine for PHP Professionals – www.phparch.com

« previous php.general (#159777) next »