07-26-2023, 11:53 PM
I am creating a script for PrestaShop 1.6 that inserts data into a table.
My table is made in this way:
- id: int AUTO INCREMENT
- desc: string
As I enter a description I would get back the ID value.
On can not use the standard because it blocked by PrestaShop.
I find this a situation:
$sql = "INSERT INTO `"._DB_PREFIX_."table`(`desc`) VALUES ('".$this->desc."')";
$restpo = Db::getInstance()->execute($sql);
var_dump($restpo);
But I have an answer only a boolean.
Can you suggest something?
My table is made in this way:
- id: int AUTO INCREMENT
- desc: string
As I enter a description I would get back the ID value.
On can not use the standard because it blocked by PrestaShop.
I find this a situation:
$sql = "INSERT INTO `"._DB_PREFIX_."table`(`desc`) VALUES ('".$this->desc."')";
$restpo = Db::getInstance()->execute($sql);
var_dump($restpo);
But I have an answer only a boolean.
Can you suggest something?