note 46316 deleted from function.ora-do by sean
| From: | sean@php.net | Date: | Wed, 06 Oct 2004 22:00:01 +0000 |
| Subject: | note 46316 deleted from function.ora-do by sean | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-78100@lists.php.net to get a copy of this message | ||
Note Submitter: thiagoribeiro at gmail dot com
----
If you want to get information from oracle, use DO WHILE because if you use the while command you
won't be able to get the first value.
The command ora_fetch works moving the pointer to the next line, the first value of the query dont
need to be refenced.
Example:
$numCols = ora_numcols($query);
do {
for($i=0;$i<$numCols;$i++) {
$tmp=ora_getcolumn($query,$i);
echo $tmp."<br>";
}
} while(ora_fetch($query));