Log in

View Full Version : Quick Coding Thingy-ma-jiggy



JoeComins
15-08-2006, 11:02 AM
I would like a table, with the headings:
Name
Played
Won
Lost
Points

Simple eh?
Well, I want them to be able to be sorted assending and decending with the arrows at the top to sort them, such as:
http://csstats.scmgames.net/hlstats.php?mode=clans&game=css

I also need it to have an admin panel so that the guy on the site only has to add a name to add a user, or just update the played, won, etc

If theres one somewere on the internet, tell me <3

Thanks

Tomm
15-08-2006, 11:15 AM
Install hlstatsx on your server?

JoeComins
15-08-2006, 11:30 AM
Its not for a server. It because I want a table saying the amount of games each member has played, how many won, lost, and the points they get for winning/loosing/drawing etc

JoeComins
15-08-2006, 01:54 PM
OK Then.

Whats the code to sort by assending/dessending.

If someone could make me a quick table with the sort options already included in PHP, I would be greatful.

Splinter
15-08-2006, 05:41 PM
for mysql its:


$query = mysql_query("SELECT * FROM stats ORDER BY id DESC");

or


$query = mysql_query("SELECT * FROM stats");

to make it ascend.

Splinter
15-08-2006, 05:41 PM
for mysql its:


$query = mysql_query("SELECT * FROM stats ORDER BY id DESC");

or


$query = mysql_query("SELECT * FROM stats ORDER BY id");

to make it ascend.

Sygon.
15-08-2006, 05:52 PM
SELECT FROM table ORDER BY ASC

JoeComins
15-08-2006, 06:04 PM
I did it myself earlier using JavaScript

Want to hide these adverts? Register an account for free!