I have this piece of code to check if an item already exists in the users cart table.
However this particular piece of code
is coming back with an error of Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result Can anyone help me, I dont understand it!
Code:
$result = mysql_query("select count(*) from cart where cookieId = '" . GetCartId() . "' and itemId = $itemId");
$row = mysql_fetch_row($result);
$numRows = $row[0];
if($numRows == 0)
{
Code:
$row = mysql_fetch_row($result);
Code:
$result = mysql_query("select count(*) from cart where cookieId = '" . GetCartId() . "' and itemId = $itemId");
$row = mysql_fetch_row($result);
$numRows = $row[0];
if($numRows == 0)
{