note 53011 deleted from function.oci-fetch-array by sixd
| From: | sixd@php.net | Date: | Wed, 18 Nov 2009 22:44:30 +0000 |
| Subject: | note 53011 deleted from function.oci-fetch-array by sixd | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-163049@lists.php.net to get a copy of this message | ||
Note Submitter: dwhitaker at dfwairport dot com
Reason: 0
----
Example 3 above is incorrect...
OCI_NUM should be OCI_ASSOC
So it should read something like this:
<?php
$connection = ocilogon("user", "password", "dbname");
$query = "SELECT id, name, lob_field FROM fruits";
$statement = oci_parse ($connection, $query);
oci_execute ($statement);
while ($row = oci_fetch_array ($statement, OCI_ASSOC)) {
$id = $row['ID'];
$name = $row['NAME'];
$lob_field = $row['LOB_FIELD'];
echo $id.' '.$name.' '.$lob_field;
}
?>