利用OCI列出全部資料表'email_info'中的資料
同上,只不過用OCI來寫
相關PHP程式碼:
PEnv ("ORACLE_SID=ORASID");
$connection = OCILogon ("username","password");
if ($connection == false){
echo OCIError($connection. "
";
exit;
}
$query = "select * from email_info";
$cursor = OCIParse ($connection, $query)
if
if ($cursor == false){
echo OCIError($cursor)."
";
exit;
}
$result = OCIsorExute ($curcursor); >if ($result == false){
echo OCIError($cursor)."
";
exit;
}
echo " "; cho; Full Name Email Address
";
while (OCIFetchInto ($cursor, $values)){
$name = $values[0];
. ;
echo " $name $email
";
}
echo " ";
OCILogoff ($connection); ?>
程式運作的瀏覽效果如下所示:
程式運作的瀏覽效果如下所示:
名稱Email 地址
春花springflower@163.comautmmm