note 43941 added to function.ocifetchstatement
| From: | humberto at humbertosilva dot com | Date: | Fri, 09 Jul 2004 11:06:24 +0000 |
| Subject: | note 43941 added to function.ocifetchstatement | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-72920@lists.php.net to get a copy of this message | ||
I had a problem with ocifetchstatement, it didn't returned nor more or less than 13 rows
whatever the skip or num_rows was set to....
I found that it has a bug, you MUST specify the last parameter, so i added OCI_FETCHSTATEMENT_BY_ROW
to the function call and it works fine.
Hope this helps someone out there ...
With:
$rows=ocifetchstatement ($st, &$arr, 0, 20);
Returns:
$rows » 20
count($arr) » 13 !!! (should be 20)
Now here's the working version:
With:
$rows=ocifetchstatement ($st, &$arr, 0, 20, OCI_FETCHSTATEMENT_BY_ROW);
Returns:
$rows » 20
count($arr) » 20
wich are the right values.
Regards,
Humberto Silva
http://www.humbertosilva.com/
----
Manual Page -- http://www.php.net/manual/en/function.ocifetchstatement.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+43941
Delete -- http://master.php.net/manage/user-notes.php?action=delete+43941&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+43941&report=yes
Search -- http://master.php.net/manage/user-notes.php