mardi 31 juillet 2018

Laravel 5 Error occurs while inserting into sql table with sequence_id

I am trying to insert data to oracle sql and nothing happened but this error message

Error Code : 1722 Error Message : ORA-01722: invalid number Position : 162 Statement : insert into SLS_test (call_id, phone_number, operator_name, call_comment, complaint, spon_id, technical, served, serve_comment, call_time, serve_time) values (:p0, :p1, :p2, :p3, :p4, :p5, :p6, :p7, :p8, :p9, :p10) Bindings : [call_id_seq.nextval,call_id_seq.nextval,996,996,asd,asd,asd,asd,asd,asd,asd,asd,0,0,0,0,asd,asd,2018-07-31 16:09:09,2018-07-31 16:09:09,2018-07-31 16:09:09,2018-07-31 16:09:09]


My WelcomeController.php :

public function create(Request $req)
{
    $phone_number = $req -> input('phone_number');
    $operator_name = $req -> input('operator_name');
    $call_comment = $req -> input('call_comment');
    $complaint = $req -> input('complaint');
    $spon_id = $req -> input('spon_id');
    $technical = $req -> input('technical');
    $served = $req -> input('served');
    $serve_comment = $req -> input('serve_comment');
    $ctime = new DateTime();
    $stime = new DateTime();
    $data = array("call_id" => "call_id_seq.nextval" , "phone_number"=>$phone_number,"operator_name"=>$operator_name,"call_comment"=>$call_comment,"complaint"=>$complaint,"spon_id"=>$spon_id,"technical"=>$technical,"served"=>$served,"serve_comment"=>$serve_comment,"call_time"=>$ctime,"serve_time"=>$stime);
    DB::table('test')->insert($data);
}



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire