note 19560 deleted from function.mysql-num-rows by betz

From: Date: Sat, 10 Aug 2002 17:14:40 +0000
Subject: note 19560 deleted from function.mysql-num-rows by betz
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-34767@lists.php.net to get a copy of this message
I have found that using the following OCCASSIONALLY produced an error specifying that something was not a valid MySQL resource. $sql = "Select sid from table1; $result = @mysql_query($sql); $num = mysql_num_rows($result); All I really wanted was a count of rows. I added this above that code and the problem was solved. mysql_select_db("dbname"); I had the db selection elsewhere in my code so I guess that's why I occassionally experienced the problem. I hope this helps clear things up for someone. -PVT

« previous php.notes (#34767) next »