note 25533 added to function.ociresult
| From: | erabbott at NOSPAMterra dot com dot br | Date: | Thu, 26 Sep 2002 20:35:48 +0000 |
| Subject: | note 25533 added to function.ociresult | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-37303@lists.php.net to get a copy of this message | ||
Note that if you are making multiple table selects, you must specify an alias to each column.
This wont work:
----------------------------------------
$qry = "SELECT A.COL_ONE, B.COL_ONE FROM TABLE1 A, TABLE2 B";
$stmt = OCIParse($conn, $qry);
while(OCIFetch($stmt))
{
$a = OCIResult($stmt, "A.COL_ONE");
...
----------------------------------------
But this will:
----------------------------------------
$qry = "SELECT A.COL_ONE AS X, B.COL_ONE AS Y FROM TABLE1 A, TABLE2 B";
$stmt = OCIParse($conn, $qry);
while(OCIFetch($stmt))
{
$a = OCIResult($stmt, "X");
...
----------------------------------------
Regards,
--
http://www.php.net/manual/en/function.ociresult.php
http://master.php.net/manage/user-notes.php?action=edit+25533
http://master.php.net/manage/user-notes.php?action=delete+25533
http://master.php.net/manage/user-notes.php?action=reject+25533