Re: php3/php4 difference

From: Date: Sun, 24 Feb 2002 07:15:44 +0000
Subject: Re: php3/php4 difference
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-85981@lists.php.net to get a copy of this message
In article <20020222173319.85878.qmail@web20305.mail.yahoo.com>, tanknank@yahoo.com says... > $numresult=mysql_query($sql) > or die( "4 QUERY ERR $sql"); > > echo "numresult = $numresult"; > > $numrows=mysql_num_rows($numresult); > mysql_free_result($numresult); > echo "<P align='left'>You have selected " .$numrows ." > record(s)."; > > When I run the script above on php4 windows I get the > following result: > > numresult = Resource id #2 > You have selected 0 record(s). > > > When I run the script above on php3 linux I get the > following result: > > numresult = 2 > You have selected 1382 record(s). > > > Why do I get two different values for $numresult? > Thanks Are you actually using the same database for both queries? Try running the query from the command line on both machines and see what happens. -- David Robley Temporary Kiwi! Quod subigo farinam

« previous php.general (#85981) next »