note 95764 deleted from function.odbc-fetch-array by aharvey

From: Date: Tue, 08 Jan 2013 02:47:32 +0000
Subject: note 95764 deleted from function.odbc-fetch-array by aharvey
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-192812@lists.php.net to get a copy of this message
Note Submitter: armando dot ortiz at cppcorp dot com ---- In trying to execute queries and looping through the results like so... <?php while( odbc_fetch_row( $myResultID ) ) { $myRow = odbc_fetch_array( $myResultID ); $thisResult[ $myRow[ "column" ] ] = $myRow; } ?> ...I found that not only was my first row being skipped, but also every OTHER row was being skipped, thus a known result set containing 14 rows would dwindle down to 7. My solution is as follows as I needed to return an array of rows: <?php while( $myRow = odbc_fetch_array( $myResultID ) ) { $thisResult[ $myRow[ "column" ] ] = $myRow; } ?>

« previous php.notes (#192812) next »