• 0
Sign in to follow this  
Fresh prince

Storage npc

Question

Hello rathena,

Requesting a npc that will tell you the account ids that has 400+ items on their storage.

Example is when you click a npc, it will say

Users:

10000

13000

13669

14778

16876

Has more than 400 items on their storage.

Thanks!!

This is for only a game master's use ofcourse. Thanks you!

Little help here please? :(

Share this post


Link to post
Share on other sites

4 answers to this question

Recommended Posts

Try

SELECT `account_id`,COUNT( `nameid` ) AS `total` FROM `storage` GROUP BY `account_id` HAVING `total` >= 400 ORDER BY `total` DESC
  • Upvote 1

Share this post


Link to post
Share on other sites

try

query_sql( "SELECT `account_id`,COUNT( `nameid` ) AS `total` FROM `storage` WHERE `total` >= 400 GROUP BY `account_id` ORDER BY `total` DESC",[email protected],[email protected] );
[email protected]_size = getarraysize( [email protected] );
for ( [email protected] = 0; [email protected] < [email protected]_size; [email protected]++ ) 
	mes [email protected][[email protected]]+" - "[email protected][[email protected]]+" items";
close;
  • Upvote 1

Share this post


Link to post
Share on other sites

Thanks Master Emistry,

 

it produced an error like this.

 

: DB error - unknown column 'total' in 'where clause'

 

regards

Share this post


Link to post
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
Answer this question...

×   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.

Sign in to follow this