如何从名为EMPNO
的表格中提取ENAME
和emp
列?
这是我的连接字符串:
if ($c = oci_connect("tharindu", "123456", "localhost/XE")) {
echo "Successfully connected to Oracle.";
oci_close($c);
} else {
$err = oci_error();
echo "Oracle Connect Error " . $err['text'];
}
答案 0 :(得分:3)
$array = oci_parse($c, "SELECT EMPNO,ENAME
FROM emp");
oci_execute($array);
while($row=oci_fetch_array($array))
{
echo $row[0]." ".$row[1];
}