mysql_result differences in PHP3 and PHP4

From: Date: Mon, 03 Jan 2000 11:44:34 +0000
Subject: mysql_result differences in PHP3 and PHP4
Groups: php.version4 
Request: Send a blank email to php-version4+get-8832@lists.php.net to get a copy of this message
Hi, We're using PHP3 and constructions like these are working fine: $Query = "select * from Transactie, TransactieType where Transactie.RefNr = '$RefNr' and TransactieType.Type = Transactie.Type order by Transactie.Datum desc, Transactie.Tijd desc"; $Cursor = mysql( "Administratie", $Query ); $Aantal = mysql_numrows( $Cursor ); for( $Lus = 0; $Lus < $Aantal; $Lus++ ) { $Id = mysql_result( $Cursor, $Lus, "Transactie.Id" ); $Type = mysql_result( $Cursor, $Lus, "TransactieType.Id" ); echo( $Id . "-" . $Type . "\n" ); } But we are upgrading to PHP4 to get it's higher performance and extended OO flexibility. And now this construction shows only the first row from the query and after it shows the following messages for each row: Warning: Naw not found in MySQL result index 2 in /home/test/select.phtml on line 77 Warning: Naw not found in MySQL result index 2 in /home/test/select.phtml on line 78 Where am I going wrong? Regards, Erwin

« previous php.version4 (#8832) next »