PHP : Function Reference : Oracle Functions : oci_fetch_object
Examples ( Source code ) » oci_fetch_object
<?php
$conn = oci_connect("hr", "hrpwd", "//localhost/XE");
$stid = oci_parse($conn, 'select * from employees');
oci_execute($stid);
while ($row = oci_fetch_object($stid)) {
// var_dump($row);
echo "EMPLOYEE_ID=".$row->EMPLOYEE_ID."\n";
echo "FIRST_NAME=".$row->FIRST_NAME."\n";
echo "LAST_NAME=".$row->LAST_NAME."\n";
echo "EMAIL=".$row->EMAIL."\n";
echo "PHONE_NUMBER=".$row->PHONE_NUMBER."\n";
echo "HIRE_DATE=".$row->HIRE_DATE."\n";
echo "JOB_ID=".$row->JOB_ID."\n";
echo "SALARY=".$row->SALARY."\n";
echo "COMMISSION_PCT=".$row->COMMISSION_PCT."\n";
echo "MANAGER_ID=".$row->MANAGER_ID."\n";
echo "DEPARTMENT_ID=".$row->DEPARTMENT_ID."\n";
}
?>
|