legrolls Posted May 16, 2009 Posted May 16, 2009 I know adding an item to inventory is just: $db->query("INSERT INTO inventory VALUES('',id,$userid,1)"); But what is delete? I tried: $db->query("DELETE FROM inventory VALUES('',35,$userid,1)"); but nothing happened. Quote
Lithium Posted May 16, 2009 Posted May 16, 2009 Re: Deleting an item? http://dev.mysql.com/doc/refman/5.0/en/delete.html Quote
AlabamaHit Posted May 16, 2009 Posted May 16, 2009 Re: Deleting an item? Use your functions. v2 Has an item remove function. Quote
CrazyT Posted May 16, 2009 Posted May 16, 2009 Re: Deleting an item? Yes item_add(USERID, ID OF ITEM, ITEM QTY); I think it's the same way for item_remove(); If im right. Quote
legrolls Posted May 16, 2009 Author Posted May 16, 2009 Re: Deleting an item? I followed you, and it worked for ID 1, but how do I make it work for all IDs? Quote
legrolls Posted May 17, 2009 Author Posted May 17, 2009 Re: Deleting an item? FIXED, thanks everyone. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.