From:             [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 . "&nbsp;&nbsp;");
         }
      }
   }
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to