RE: [PHP-DB] oracle8
| From: | indrek siitan | Date: | Fri, 01 Dec 2000 23:13:33 +0000 |
| Subject: | RE: [PHP-DB] oracle8 | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-4950@lists.php.net to get a copy of this message | ||
Hi,
a very simple example:
<?
$query="SELECT col1,col2 FROM table ORDER BY col1";
$sth=OCIParse($GLOBALS["DBH"],$query);
OCIExecute($sth);
while (OCIFetchInto($sth,&$row,OCI_ASSOC+OCI_RETURN_NULLS+OCI_RETURN_LOBS))
{
?>
<TR>
<TD><?= $row["COL1"] ?></TD>
<TD><?= $row["COL2"] ?></TD>
</TR>
<?
}
OCIFreeStatement($sth);
?>
NOTE: the column names in $row MUST BE uppercase.
hope that helps.
Rgds,
Tfr
--==< tfr@cafe.ee >==< http://tfr.cafe.ee/ >==<
+372-50-17621 >==--