Open sugumarv opened 6 years ago
I have exactly the same problem, No errors with the query, but there's no row inserted.
Have you tried running it as a transaction and committing after the fact?
https://github.com/ThingEngineer/PHP-MySQLi-Database-Class#transaction-helpers
solved by my code: add this: https://github.com/ThingEngineer/PHP-MySQLi-Database-Class/pull/954
Following is the query I am trying to execute from
$data_paypal = array ( 'payment_date' => '23:03:24 May 29, 2018 PDT', 'txn_id' => 'LKJKL98798JH987987', 'verify_sign' => 'lkjkljkjlkjklj9878979jklhjJKHKJHLKJLJ98798kljhljlkjl', 'payer_email' => 'payer@paypal.com', 'ipn_track_id' => '98789789kjhkjh', 'payer_id' => 'KLHJ987KH98', 'payer_business_name' => NULL, 'first_name' => 'sugumar', 'last_name' => 'venkatesan', 'userid' => '987', 'receiver_email' => 'MYEMAIL@gmail.com', 'receiver_id' => 'LKJHLJ987KJH987', 'type' => 'jobpost', 'ipnreceivedate' => '2018-05-30 11:33:36', 'gateway' => 'paypal', 'amount' => '500.00', ); $db->setTrace (true); $paypalpayments_insert_id = $db->insert('mytablename',$data_paypal); print_r ($db->trace); echo $paypalpayments_insert_id;die();
$db->trace shows the following:
payment_date
,txn_id
,verify_sign
,payer_email
,ipn_track_id
,payer_id
,payer_business_name
,first_name
,last_name
,userid
,receiver_email
,receiver_id
,type
,ipnreceivedate
,gateway
,amount
) VALUES ('23:03:24 May 29, 2018 PDT', 'LKJKL98798JH987987', 'lkjkljkjlkjklj9878979jklhjJKHKJHLKJLJ98798kljhljlkjl', 'payer@paypal.com', '98789789kjhkjh', 'KLHJ987KH98', 'NULL', 'sugumar', 'venkatesan', '987', 'MYEMAIL@gmail.com', 'LKJHLJ987KJH987', 'jobpost', '2018-05-30 11:33:36', 'paypal', '500.00')but it doesn't insert anything into the mytablename, but the query displayed using $db->trace runs correctly in the phpmyadmin ie inserts a new row.