Skip to content

insert query doesn't insert data into the table. #759

Description

@sugumarv

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:

   
  Array
  (
  [0] => Array
  (
  [0] => INSERT INTO mytablename (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')
  [1] => 0.000188112258911
  [2] => MysqliDb->insert() >> file "/home/mysite/public_html/mysite/viewjob.php" line #58
  )
   
  )
 

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions