MySQL Help
#1

Hallo,
I need to see online players in my site +Their kills + If admin their level + Deaths + Their Team
I need to see reports kicks,bans,warnings in forum with name of admin who banned and reason for ban and time of ban.
if any one can help me.
Pls Pm Me.
Reply
#2

create two mysql tables: one for current player information (fields like: name, kills, deaths, admin team)
When one of these changes (OnPlayerConnect, OnPlayerDisconnect, OnPlayerDeath, on team change). Use the mysql UPDATE statement with WHERE name=playername. On player connection you need to add him to the list with INSERT. When a player leaves you will need the DELETE statement, also with WHERE name=playername to remove the player from the list.

For reports etc its exactly the same thing, but in another table with other fields.

You can find a detailled explanation of the mysql statements by googling them, and information on how to use them in the script in the topic of the mysql plugin of your choice.

In your website connect to the database, use the query "SELECT * FROM tablename" to get all data of one of the tables. Then use a for or a while loop to retrieve all result lines one-by-one and printing their data to a table or something. Detailled tutorials on how to use mysql with php can also be found via ******.
Reply
#3

Thanks a lot. +Rep.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)