请注意,如果您要进行多个表选择,则必须为每个列指定别名。
这将不起作用
----------------------------------------
$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");
...
----------------------------------------
但这样可以
----------------------------------------
$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");
...
----------------------------------------
此致,