Re: random?

From: Date: Thu, 29 Jan 2004 22:56:24 +0000
Subject: Re: random?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-176269@lists.php.net to get a copy of this message
Chris wrote:
Warning: mysql_result(): supplied argument is not a valid MySQL result resource in /home/virtual/site17/fst/var/www/html/function.php on line 51 Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in /home/virtual/site17/fst/var/www/html/function.php on line 52 Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/virtual/site17/fst/var/www/html/function.php on line 58 I get the above repeating errors when I aply the code below to the random function: 49 srand ((double) microtime() * 1000000); 50 $r = mysql_query('select count(*) as cnt from agentdb'); 51 $cnt = mysql_result($r, 0, 0); 52 mysql_free_result($r);
My guess is that something is wrong with your query. Echo out mysql_error() after line 50. -- By-Tor.com It's all about the Rush http://www.by-tor.com

« previous php.general (#176269) next »