Teach you to use Oracle Database in PHP (vi)
Use OCI to list data in all data table ' Email_info '
Ditto, just use OCI to write
Related PHP Code:
PUTENV ("Oracle_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 sPRingflower@163.com
Autumn Moon autumnmoon@163.com
... ...
The above describes the teaching you to use the Oracle database in PHP (vi), including aspects of the content, you want to be interested in PHP tutorial friends helpful.