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.


Popular posts from this blog

php - How should I create my API for mobile applications (Needs Authentication) -

5 Reasons to Blog Anonymously (and 5 Reasons Not To)

Google AdWords and AdSense - A Dynamic Small Business Marketing Duo