PHP 4.3.9
Oracle 10G
Let me preface this problem with I am new to oracle and am used to working with MySQL
Having said that, I am having a problem with the current insert statement.
$upload="
insert into lmeadm.trip_segment (id, unitno, downloaddate, drive_time, distance, fuel, idle_time, idle_fuel, idle_percent, load_factor, ave_speed, ave_Dspeed, max_speed, max_rpm, start_time, end_time, start_odo, end_odo)
values (:id, :unit, to_date(:dateFormatted, 'dd-mon-yy hh:mi AM'), :drive_time, :distance, :fuel, :idle_time, :idle_fuel, :idle_percent, :load_factor, :ave_speed, :ave_Dspeed, :max_speed, :max_rpm, :start_time, :end_time, :start_odo, :end_odo)";
OCIBindByName($upload, ":id", $id);
OCIBindByName($upload, ":unit", $unit);
OCIBindByName($upload, ":dateFormatted", $dateFormatted);
OCIBindByName($upload, ":drive_time", $drive_time);
OCIBindByName($upload, ":distance", $distance);
OCIBindByName($upload, ":fuel", $fuel);
OCIBindByName($upload, ":idle_time", $idle_time);
OCIBindByName($upload, ":idle_fuel", $idle_fuel);
OCIBindByName($upload, ":idle_percent", $idle_percent);
OCIBindByName($upload, ":load_factor", $load_factor);
OCIBindByName($upload, ":ave_speed", $ave_speed);
OCIBindByName($upload, ":ave_Dspeed", $ave_Dspeed);
OCIBindByName($upload, ":max_speed", $max_speed);
OCIBindByName($upload, ":max_rpm", $max_rpm);
OCIBindByName($upload, ":start_time", $start_time);
OCIBindByName($upload, ":end_time", $end_time);
OCIBindByName($upload, ":start_odo", $start_odo);
OCIBindByName($upload, ":end_odo", $end_odo);
//
$statementb= OCIParse($c, $upload);
OCIExecute($statmentb, OCI_DEFAULT);
OCICommit($connection);
The information is not being inserted into the table.
I have tried this query with and without binding and nothing seems to work..
What is odd is that I can execute this query within the SQL developer interface.
Thanks