Jump to content
MakeWebGames

How would I ......


shaved92bravada
 Share

Recommended Posts

Guest Anonymous

Re: How would I ......

SELECT COUNT(inv_id) FROM inventory WHERE inv_itemid IN (1,2,3) AND inv_userid = #

IIRC, this should return 3 assuming you have each of the types as listed in braces.

So the mod itself could use a CSV (comma separated field) of item ID's that are required and use:

$sql = sprintf("SELECT COUNT(inv_id) FROM inventory WHERE ((inv_itemid IN (%s) AND (inv_userid = %u))", $comma_separated_field, $userid);

where $comma_separated field is the list.

May need some adjustment, but you should get the point...

Link to comment
Share on other sites

Re: How would I ......

Just wanted to say thank you for your help Nyna. Haven't quite got it figured out just yet but I'm not giving up yet either. I just commented it out for now to take a break and went on to a couple of other functions in the script. Once I get it done I am thinking of posting it as a free mod and would like if you would look it over and tell me what I need to improve on. Thanks

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.

 Share

×
×
  • Create New...