php - How to insert data into mysql in prestashop 1.6 -
dear: helper try insert data mymodulenamevalidationmodulefrontcontroller extends modulefrontcontroller class in validation.php. want data new table created in mysql when payment way complete can't insert me please?
this function
public function getorderinfo($point_id){ $insertdata = array( 'point_id' => $point_id, ); if (!db::getinstance()->insert(_db_prefix_."order_info", $insertdata)) echo "errors insert data"; exit(); } i errors insert data time.
a first error see use _db_prefix_ in front of table name. should not put prefix, prestashop add later in insert() method.
if there still error please, add structure of table in question. add var_dump of $insertdata array.