note 58115 added to function.ocifetchinto
| From: | php at natalian dot org | Date: | Mon, 24 Oct 2005 23:45:06 +0000 |
| Subject: | note 58115 added to function.ocifetchinto | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-97533@lists.php.net to get a copy of this message | ||
There might be a better way.
<?php
$conn = OCILogon('user', 'secret', 'DB');
$th = 0; // Table Header
$query = 'select * from PAYMENT';
$stid = OCIParse($conn, $query);
OCIExecute($stid);
echo "<table>\n\n";
while (OCIFetchInto($stid, $row, OCI_ASSOC)) {
if (!$th) {
$keys = (array_keys($row));
echo "\n<tr>\n";
foreach ($keys as $k) {echo "<th>" . $k . "</th>\n";}
echo "</tr>\n";
$th = 1; // Table header done !
}
echo "\n<tr>\n";
foreach ($keys as $k) {echo "<td>" . $row[$k] .
"</td>\n";}
echo "</tr>\n";
$count = $count + 1;
}
echo "</table>\n\n";
echo "<h3>" . $count . " records</h3>";
OCILogoff($conn);
?>
----
Manual Page -- http://www.php.net/manual/en/function.ocifetchinto.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+58115
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+58115&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+58115&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+58115&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+58115&report=yes&reason=useless
Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+58115&report=yes&reason=non-english
Delete: already in docs -- http://master.php.net/manage/user-notes.php?action=delete+58115&report=yes&reason=already+in+docs
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+58115&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+58115&report=yes
Search -- http://master.php.net/manage/user-notes.php