note 45515 added to function.ocifetchstatement
| From: | phpnet at rafael dot eti dot br | Date: | Thu, 09 Sep 2004 14:47:00 +0000 |
| Subject: | note 45515 added to function.ocifetchstatement | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-76327@lists.php.net to get a copy of this message | ||
Humberto, from the previous note misunderstood the function ocifetchstatement. The default value of
the last parameter is OCI_FETCHSTATEMENT_BY_COLUMN. That is the reason that $rows has the value 20
and count($arr) has the value 13 in:
$rows=ocifetchstatement ($st, &$arr, 0, 20);
It happens because his query probably had 13 columns.
That way, count($arr[0]) would have the value 20 that he expected of count($arr).
So,
$rows=ocifetchstatement ($st, &$arr, 0, 20);
is equivalent to
$rows=ocifetchstatement ($st, &$arr, 0, 20, OCI_FETCHSTATEMENT_BY_COLUMN);
and it is not equivalent to
$rows=ocifetchstatement ($st, &$arr, 0, 20, OCI_FETCHSTATEMENT_BY_ROW);
I hope this helps to avoid some confusion about ocifetchstatement.
----
Manual Page -- http://www.php.net/manual/en/function.ocifetchstatement.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+45515
Delete -- http://master.php.net/manage/user-notes.php?action=delete+45515&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+45515&report=yes
Search -- http://master.php.net/manage/user-notes.php