Create A Table Using OCI
Below we will create an email personal information book. This time using the OCI8 API directive
Related PHP Code:
PUTENV ("Oracle_sid=orasid");
$connection = Ocilogon ("username", "password");
if ($connection = = False) {
echo Ocierror ($connection). "
";
Exit
}
$query = "CREATE Table Email_info".
"(FullName varchar (255), email_address varchar (255))";
$cursor = Ociparse ($connection, $query);
if ($cursor = = False) {
echo Ocierror ($cursor). "
";
Exit
}
$result = Ociexecute ($cursor);
if ($result = = False) {
echo Ocierror ($cursor). "
";
Exit
}
Ocicommit ($connection);
Ocilogoff ($connection);
?>
We can see that the 2 code syntax is almost the same, the difference is only the function name is different; Second, in OCI8 we do not need to run the instruction to open the cursor specifically, and a cursor ID is returned automatically when the Ociparse system is called.
http://www.bkjia.com/PHPjc/315672.html www.bkjia.com true http://www.bkjia.com/PHPjc/315672.html techarticle Create a Table Using the OCI below we will create an email personal information book. This time using the OCI8 API Directive related PHP code: PUTENV (ORACLE_SID=ORASID); $connection = Ocilogon (username, p ...