1
Hello everybody!
I need your assistance. I am developing a shopping cart module, and I am runnin into a perculiar problem.
Whenever a user tries to add a product to their cart, the insert statment fails, but does not give any indication of what the problem is.
The function that gets called to perform the insert is as follows:
function newprod($cartid, $prodid){
global $xoopsDB;
$sql = "insert into " . $xoopsDB->prefix('cart') . " (session, prodid) values ('" . $cartid . "', '" . $prodid . "'";
$result = $xoopsDB->query($sql) or die('SQL Error: ' . mysql_error());
}
I know the insert statement works, becuase I have something similar in the admin control panel to add categories and products.
Any help will be greatly appreciated!
TIA