Use OCI to list data in all data table ' Email_info '
Ditto, just use OCI to write
Related PHP (PHP training PHP tutorial) code:
The following is a reference fragment:
PUTENV ("Oracle (Oracle Training) _sid=orasid");
$connection = Ocilogon ("username", "password");
if ($connection = = False) {
echo Ocierror ($connection). "
";
Exit
}
$query = "SELECT * from Email_info";
$cursor = Ociparse ($connection, $query);
if ($cursor = = False) {
echo Ocierror ($cursor). "
";
Exit
}
$result = Ociexecute ($cursor);
if ($result = = False) {
echo Ocierror ($cursor). "
";
Exit
}
echo "";
echo "Full Name Email Address
";
while (Ocifetchinto ($cursor, $values)) {
$name = $values [0];
$email = $values [1];
echo "$name $email
";
}
echo "";
Ocilogoff ($connection);
?>
The browsing effects of the program run are as follows:
Name Email Address
Spring flower [email protected]
Autumn Moon [email protected]
... ...
How to use the Oracle database in PHP