php5/oci8/oracle 11g1 insert doesn't work

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The following code doesn't do the insert.

As is the connect message doesn't show.

I've tried the insert statement in a session:

[oracle@LMKIII log_book]$ sqlplus landon/rumprocella

SQL*Plus: Release 11.1.0.6.0 - Production on Sat Nov 22 16:01:39 2008

Copyright (c) 1982, 2007, Oracle.  All rights reserved.


Connected to:
Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> select * from log_book where actype='B-17';

no rows selected

SQL> quit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options


<?php // File: anyco.php

require('anyco_ui.inc');

$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['message'];
}
// the connect shows a connect if I comment out the following statements

  $stid = oci_parse($conn, 'insert into log_book values ( TO_DATE('08/12/1973','MM/dd/YYYY'),'B-17','N5787G',1,1.8);');
  $r = oci_execute($stid );

        oci_commit($conn);
        OCILogoff($conn);

?>

This is my first php/oci8/oracle insert!


      


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux