Hi All,
Need your expert suggestion again
on customfile ( include common files ) i am trying to read and insert the data
I can read data without any problem
$jsonData = ExecuteJson($sql, ["fieldcaption" => false, "tablename" => ["menu"]]);
insert/update
$count= ExecuteStatement("INSERT INTO `items` (`users_id`, `product_id`, `price`, `product_options`, `added_at`) VALUES ('1', '1', '25', NULL, '2024-12-23 13:30:55')");
getting error phpfn.php(6036): Object of class Doctrine\DBAL\Connection could not be converted to string
Any clues ?
However ths one work but why not the above one that is more neat and clean
// Get connection object
$conn = Conn();
$count = $conn->executeStatement("INSERT INTO `items` (`users_id`, `product_id`, `price`, `product_options`, `added_at`) VALUES ('1', '1', '15', NULL, '2024-12-23 13:30:05')");
Thanks