illegalife Posted November 18, 2008 Posted November 18, 2008 So for example in the lucky boxes, i want one of the cases to give an item ID 99 to that user - how would i change this query? $money=rand(330, 3300); print "You find \${$money} in the box.)"; $db->query("UPDATE users SET money=money+{$money} WHERE userid={$userid}"); break; Quote
Matsu Posted January 21, 2009 Posted January 21, 2009 Re: [V2] Add item query Wow, this is old....but no-one answered, and I actually know this one: (note: found topic using search function >.>) $itemidexplore=x; $gain=rand(1,100); print "Inside the box were $gain bandaids."; $db->query("INSERT INTO inventory VALUES('',$itemidexplore,$userid,$gain)",$c); change x to the id number of the item you want to input. Say if your bandaids were id number 2, you'd put $itemidexplore=2; Quote
AlabamaHit Posted January 22, 2009 Posted January 22, 2009 Re: [V2] Add item query ummm.....don't use that.....use item_add.. item_add(userfor,itemid,quanity); Example.....For you item id 99 and 1 of it. item_add($ir['userid'],99,1); Simple.....This auto qualifies the items. Quote
Matsu Posted January 22, 2009 Posted January 22, 2009 Re: [V2] Add item query Thanks, alabama. >.> I didn't know that one. Quote
AlabamaHit Posted January 22, 2009 Posted January 22, 2009 Re: [V2] Add item query No Problem :-D 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.