note 53699 deleted from function.oci-fetch-array by betz
| From: | betz@php.net | Date: | Thu, 09 Jun 2005 18:58:01 +0000 |
| Subject: | note 53699 deleted from function.oci-fetch-array by betz | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-90195@lists.php.net to get a copy of this message | ||
Note Submitter: dwhitaker at dfwairport dot com
----
OCI_BOTH is the default.
If you just need to return all fields, you can leave out OCI_NUM & OCI_ASSOC.
EXAMPLE:
<?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)) {
$id = $row['ID'];
$name = $row['NAME'];
$lob_field = $row['LOB_FIELD'];
echo $id.' '.$name.' '.$lob_field;
}
?>