sql - Inserting Timestamp value into database(Oracle) using php -


i have simple table follow :

create table worker (    office_start_time timestamp,    office_end_time timestamp ); 

i have html form follow :

<form method="post" action="">   <input type="datetime-local" name="office_start">   <input type="datetime-local" name="office_end">   <input type="submit" name="submit" value="submit"> </form> 

i want datetime value html form , insert table. have tried following code :

        $c1 = oci_connect("system", "faisal4590", 'localhost/faisal');          $start_time = htmlspecialchars(date('m.d.y h:i:s',                        strtotime($_post['office_start'])));         $end_time   = htmlspecialchars(date('m.d.y h:i:s',                        strtotime($_post['office_end'])));          $stmt = "insert worker                    (office_start_time,office_end_time)                  values(to_timestamp($start_time, 'yyyy-mm-dd hh:mm:ss'),                    to_timestamp($end_time, 'yyyy-mm-dd hh:mm:ss'))";          $stid    = oci_parse($c1, $stmt);          oci_execute($stid); 

but getting following error : enter image description here

i don't understand why getting error don't have missing parenthesis in code. can please? thanks..


Comments

Popular posts from this blog

php - Permission denied. Laravel linux server -

google bigquery - Delta between query execution time and Java query call to finish -

python - Pandas two dataframes multiplication? -