Jump to content
MakeWebGames

addtoshop error, please help.


pavalache

Recommended Posts

Hello again, here's my problem with addtoshop.php mccodes2.

Most of the time when i try to add the same item twice for the same price i get this error:

QUERY ERROR: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'where id=159' at line 1
Query was update usershopitems set quantity=quantity+ where id=159

 

Changing the prices eliminates the problem.

thanks!

Link to comment
Share on other sites

Re: addtoshop error, please help.

anything i should change here?

$db->query("INSERT INTO usershopitems VALUES ('','{$us['id']}','{$r['inv_itemid']}','{$_GET['price']}','$quantity')");

}

else

{

$theitem=mysql_fetch_array($checkforitem);

$db->query("update usershopitems set quantity=quantity+{$_GET['quantity']} where id={$theitem['id']}");

}

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...