Skip to content

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

Open
@sugumarv

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' => '[email protected]',
'ipn_track_id' => '98789789kjhkjh',
'payer_id' => 'KLHJ987KH98',
'payer_business_name' => NULL,
'first_name' => 'sugumar',
'last_name' => 'venkatesan',
'userid' => '987',
'receiver_email' => '[email protected]',
'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', '[email protected]', '98789789kjhkjh', 'KLHJ987KH98', 'NULL', 'sugumar', 'venkatesan', '987', '[email protected]', '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.

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