• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

TFS 0.X SQL Query to get item count in backpacks of id

GhostWD

I'm in love with the var_dump()
Joined
Jan 25, 2009
Messages
185
Solutions
6
Reaction score
29
Hi OTLanders,

I've got problem with making query that returns items count for backpacks of id

what i need is getting pid of container, itemCount and correct itemtype

I've used
Code:
SELECT pid,  COUNT(*)
FROM player_items
GROUP BY pid
HAVING pid in (SELECT DISTINCT pid FROM player_items WHERE player_id = 2 AND itemtype IN (1987,1988))
But it's not doing what i trully wan't
Thanks for help!
 
Last edited:
oh... maybe i have it
Code:
SELECT pid, sid, COUNT(*)
FROM player_items
GROUP BY pid
HAVING pid in (SELECT DISTINCT sid FROM player_items WHERE player_id = 2 AND itemtype IN (1987)) and pid > 99
but i will appreciate better attempt
 
Last edited:
Back
Top