ERROR: Can't insert Date on my phpmyadmin database.
Catchable fatal error: Object of class DateTime could not be converted to string
Im trying to Import an excel file on my database using php myqli code. Almost everything was perfect but error occured saying "Catchable fatal error: Object of class DateTime could not be converted to string"
BTW. the type of my rqn_date was 'Date' not varchar. I'd like to import the date but it seems i cant do it. I think Something is Missing.
$daten = $row; $no1 = $row; $no2 = $row; $no3 = $row; $no4 = $row; $no5 = $row; //Here, You can insert data into database. $qry = "INSERT INTO `rqn_list`(`rqn_list_date`, `rqn_no`, `rqn_dsc`, `rqn_list_cc`, `rqn_list_wf`, `rqn_list_remarks`) VALUES ('$daten', '$no1', '$no2', '$no3', '$no4', '$no5')"; $res = mysqli_query($con,$qry);