mysql_num_rows
| From: | John Taylor-Johnston | Date: | Sat, 16 Aug 2003 01:24:24 +0000 |
| Subject: | mysql_num_rows | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-159776@lists.php.net to get a copy of this message | ||
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
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");
if (mysql_num_rows($news) == 1)
include ("./html/access_error.htm");
else
include ("./html/registration.htm");