Re: problems with mysql_num_rows in PHP4

From: Date: Wed, 19 Jul 2000 02:03:40 +0000
Subject: Re: problems with mysql_num_rows in PHP4
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-7197@lists.php.net to get a copy of this message
On 18 Jul, coolio wrote: > Hi... > I´m using PHP 4.0.1pl2 with MySQL 3.22.32 on Solaris 7 > I have PHP as a CGI and I want to make some things using MySQL... > but I have problems with the mysql_num_rows function... the problem is > that sometimes the script works fine... but sometimes I get an > "Supplied argument is not a valid MySQL result resource in ..." > error... > How could it be that with the same script I get errors just some > times? > thanks.. > > -- > bye!, > coolio coolio@mdq.com Maybe because sometimes the generated SQL query is wrong? Try using mysql_error() immediately after submitting your query to mysql and see if it shows an error. You could also echo your query and see if you can spot any errors that way. Cheers -- David Robley | WEBMASTER & Mail List Admin RESEARCH CENTRE FOR INJURY STUDIES | http://www.nisu.flinders.edu.au/ AusEinet | http://auseinet.flinders.edu.au/ Flinders University, ADELAIDE, SOUTH AUSTRALIA

« previous php.general (#7197) next »