How to insert data into mysql in prestashop 1.6

Dear: Helper I try to insert data from mymodulenameValidationModuleFrontController extends ModuleFrontController class in validation.php. i want get some data to new table that i already created in mysql when my payment get way is complete but i can't insert anyone help me please?

this is my 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 all time.


ANSWERS:


A first error I see is that you use _DB_PREFIX_ in front of your table name. You should not put a prefix, Prestashop will add it for you later in insert() method.

If there is still an error please, add the structure of your table in your question. Also add a var_dump of your $insertData array.



 MORE:


 ? Fatal error: Class 'Tools' not found in prestashop for method GET
 ? do I Need to close db session in prestashop
 ? How to list orders in Prestashop 1.6 backoffice haveing no addresses assigned
 ? prestashop 1.6.1.8 Table 'prestashop.ps_cms_block' doesn't exist
 ? Prestashop CMS page view counter
 ? How to Initialize adapter in RecycleVIew?
 ? how react-native renders the TouchableOpacity components on the same row - horizontally
 ? Horizontal RecyclerView with variable item heights not wrapping properly
 ? How to align my search box to the far right end
 ? Xamarin Forms Rotating Listview adjust row width