Am currently developing a PrestaShop payment module and am having issues updating a custom column in the database
$sql = 'UPDATE `'._DB_PREFIX_.'Webpay_transactions`
SET `Customer_id` = '.(int)$customer->id.',
`ResponseCode`= '.pSQL($responsecode).',
`ResponseDescription`='.pSQL($desc).',
`ApprovedAmount`= '.(int)$transamount.',
`ReturnedReference`= '.pSQL($retRef).',
`CardNumber`='.(int)$cardNum.',
`Order_reference`= '.(int)$this->module->currentOrder.'
WHERE `TransactionRef` = '.(int)$txn_ref.'';
Db::getInstance()->execute($sql);
OK, I figured out where the issue was coming from. the TransactionRef variable had special characters which were not proper;y escaped. I had to do some fact finding and I finally found a solution.