Hi,
I have a problem. My PS 1.5.2 refuses to execute valid SQL statement. I don't know why.
The code is:
Db::getInstance()->execute('INSERT INTO `'._DB_PREFIX_.'slider` (`id_slider_image`,`name`, `position`) VALUES (NULL,"'.$name.'", '.$position.')');
which leads to result
INSERT INTO `ps_slider` (`id_slider_image`,`name`, `position`) VALUES (NULL,"Filter_bg.png", 1)
which is absolutely correct. If I take this result and copy it to the phpmyadmin SQL console, it works. So could anybody please tell me, where could be the problem?
I found out, that even a pure php functions isn't working too. But selecting is ok. Could be some permission problem? It's my own plugin. But if I can do select sqls why not the insert ones?
If I do this:
$sql = "INSERT INTO `"._DB_PREFIX_."slider` (`id_slider_image`,`name`, `position`) VALUES (NULL,'".$name."', ".$position.")";
$result = mysql_query($con,$sql)
or die("Bad query: " . mysql_error());
it exists with this:
Bad query:
Where could be problem?
Thanks