Read an item from the table(MySQL), and the cost of parsing the file(XML)
Extra work IMHO(in my humble opinion)
[SHARE] Top Adena PHP script
Forum rules
READ NOW: L2j Forums Rules of Conduct
READ NOW: L2j Forums Rules of Conduct
-
- Posts: 9
- Joined: Sat Dec 11, 2010 8:40 pm
Re: [SHARE] Top Adena PHP script
You do not have the required permissions to view the files attached to this post.
- regenx
- Posts: 319
- Joined: Sat Jul 17, 2010 6:55 am
Re: [SHARE] Top Adena PHP script
Nice query and it's working...thxpinkcore wrote:This PHP script will list richest people from server.
This script ignores all Admin / GMs characters as you can see (accessLevel = 0) in query.
First define your MySQL connection:And choose your database:Code: Select all
$db_link = mysql_connect('host', 'user', 'password');
Default script list only Top 10 players, if you want other number just change the limit at the end of query in $query_charsCode: Select all
$db_selected = mysql_select_db("database",$db_link);
Credits goes to meCode: Select all
<?php$db_link = mysql_connect('host', 'user', 'password'); mysql_query("SET CHARACTER SET utf8");if (!$db_link) { echo('Could not connect: ' . mysql_error());}$db_selected = mysql_select_db("database",$db_link);$FORM = "<table> <tr> <th align=center>Pos.</th> <th width='175px' class='Stil5' align=center>Character</th> <th width='150px' class='Stil5' align=center>Wealth</th> </tr>"; $query_chars = "SELECT * FROM items INNER JOIN characters ON items.owner_id=characters.charId WHERE item_id=57 AND characters.accesslevel = 0 AND items.loc='INVENTORY' order by count desc limit 10"; $link = mysql_query($query_chars); $i=1; $r=255; while ( $row=mysql_fetch_array($link) ) { $FORM .= "<tr> <td align=center>$i</span></td> <td align=center>$row[char_name]</td> <td align=center>".number_format($row['count'])."</td> </tr>"; $i++; $r -= 0; } echo $FORM;echo '</table>';?>
Enjoy!
https://45.media.tumblr.com/645731474a5 ... o1_400.gif
^^ Rengar FTW!
^^ Rengar FTW!
- pinkcore
- Posts: 247
- Joined: Fri Jul 24, 2009 3:04 am
- Location: Czech Republic
Re: [SHARE] Top Adena PHP script
Thanks you very much. Of course it is working - I'm using it too.
I'm not here only for food!