Date: 05/13/01
- Next message: Sterling Hughes: "Re: [PHP-DEV] GD 2 support planned?"
- Previous message: tim <email protected>: "[PHP-DEV] Bug #10842: FAQ section 8.1 should mention <input name="array[key]"> syntax"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
From: peter <email protected>
Operating system: NT 4.0 sp6
PHP version: 4.0.5
PHP Bug Type: ODBC related
Bug description: Function creates new array but does not reset pointer
I tried odbc_fetch_into() in the enclosed loop. I had to inset the reset($array) to get the loop working. I figure the function is creating new content in the array but not resetting the array pointer back to the beginning. The function should either
1/ add to the end of the array and increment the pointer
or
2/ replace the contents and reset the pointer.
$sql = "select * from stock";
$result = odbc_exec($connection["vitamins"], $sql);
if($result)
{
print("<br>Result from odbc_fetch_into()" );
$array = "";
while($result_all = odbc_fetch_into($result, 0, $array))
{
reset($array);
print("<br>" );
while(list($k, $v) = each($array))
{
print($v . " ");
}
}
}
else
{
print("<br>No result" );
}
-- Edit Bug report at: http://bugs.php.net/?id=10843&edit=1-- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe <email protected> For additional commands, e-mail: php-dev-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: Sterling Hughes: "Re: [PHP-DEV] GD 2 support planned?"
- Previous message: tim <email protected>: "[PHP-DEV] Bug #10842: FAQ section 8.1 should mention <input name="array[key]"> syntax"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

