why didn't errors show up
| From: | Fred Silsbee | Date: | Sun, 23 Nov 2008 22:22:57 +0000 |
| Subject: | why didn't errors show up | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-45697@lists.php.net to get a copy of this message | ||
OK I had to (thanks to Jack Nav Zanen)
(1) remove the ";" off the sql statement
(2) change "'" to """
but why did NOTHING appear on the browser screen?
<?php // File: anyco.php
$db = "(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SID = LMKIIIGDNSID)
)
)";
if ($conn=oci_connect('landon', 'rumprocella',$db))
{
echo "Successfully connected to Oracle.\n";
// OCILogoff($conn);
}
else
{
$err = OCIError();
echo "Oracle Connect Error " . $err;
}
$stid = oci_parse($conn, "insert into log_book_id values (logid.nextval,
TO_DATE('08/12/1973','MM/dd/YYYY'),'B-17','N5787G',1,1.8)");
if (!$stid) {
$oerr = OCIError($stid);
echo "Parse error:".$oerr;
exit;
}
if (!oci_execute($stid )) {
$oerr = OCIError($stid);
echo "Exec error:".$oerr;
exit;
}
oci_commit($conn);
OCILogoff($conn);
echo "end";
?>