Project 1999

Go Back   Project 1999 > Blue Community > Blue Server Chat

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #9  
Old 03-30-2010, 04:15 PM
Cilraaz Cilraaz is offline
Aviak


Join Date: Mar 2010
Posts: 56
Default

Assuming that P99's character table isn't much different from the default PEQ character table, the SQL would just be something like:

SELECT class, count(distinct id) FROM character_ WHERE timelaston > (UNIX_TIMESTAMP() - 604800) AND level > '5' GROUP BY class;

Replace 5 with whatever level you want to check for. That will check for individual characters (not accounts) that have been logged on in the past 7 days, so it would eliminate some mules and unplayed alts from the list. You could even use this to show representation within brackets (ie. "level > '5 AND level < '11'" would give you the 5-10 bracket, etc).

Edit:

Assuming that it wouldn't put too much strain on the SQL server, you could create a PHP script that would display the different brackets. You'd just need to decide what brackets you wanted it chopped by, but it could pull and display say 1-9, 10-19, 20-29, 30-39, 40-49, and 50.

SELECT class, count(distinct id) FROM character_ WHERE timelaston > (UNIX_TIMESTAMP() - 604800) AND level > '0' AND level < '10' GROUP BY class;
SELECT class, count(distinct id) FROM character_ WHERE timelaston > (UNIX_TIMESTAMP() - 604800) AND level > '9' AND level < '20' GROUP BY class;
SELECT class, count(distinct id) FROM character_ WHERE timelaston > (UNIX_TIMESTAMP() - 604800) AND level > '19' AND level < '30' GROUP BY class;
SELECT class, count(distinct id) FROM character_ WHERE timelaston > (UNIX_TIMESTAMP() - 604800) AND level > '29' AND level < '40' GROUP BY class;
SELECT class, count(distinct id) FROM character_ WHERE timelaston > (UNIX_TIMESTAMP() - 604800) AND level > '39' AND level < '50' GROUP BY class;
SELECT class, count(distinct id) FROM character_ WHERE timelaston > (UNIX_TIMESTAMP() - 604800) AND level = '50' GROUP BY class;
__________________
Cilraaz Xraktz
41 Iksar Monk
Arranla
40 Erudite Enchanter
<Kittens Who Say Meow>
P99 Blue
Last edited by Cilraaz; 03-30-2010 at 04:46 PM.. Reason: Fixed SQL statements
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 09:59 AM.


Everquest is a registered trademark of Daybreak Game Company LLC.
Project 1999 is not associated or affiliated in any way with Daybreak Game Company LLC.
Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.