note 15276 added to function.odbc-fetch-into

From: Date: Tue, 04 Sep 2001 10:36:34 +0000
Subject: note 15276 added to function.odbc-fetch-into
Groups: php.notes 
Request: Send a blank email to php-notes+get-17603@lists.php.net to get a copy of this message
Most annoyingly with PHP 4.0.6, the new "feature" regarding the requirement of the row number to be non-constant means that this code no longer works: $row_num = 1; $row = array(); while (odbc_fetch_into($result, $row_num++, $row) { // Stuff } So if you were wondering why, that's why. This infuriated me above all other issues I've had with PHP when I upgraded to 4.0.6 Luckily the workaround is easy enough. Just use $row_num in the odbc_fetch_into() and add $row_num++ inside the while loop. But it's still very annoying! I haven't found any other functions where this is an issue.. http://www.php.net/manual/en/function.odbc-fetch-into.php

« previous php.notes (#17603) next »