Posts: 218
Threads: 50
Joined: Dec 2017
Reputation:
0
Hello, I need help regarding MySQL..
I want to make logging system to make SMLOGS/PMLOGS..
Like I will make a command /SMLOG, I can make it fetch all the SMs of that person.. But thats not how i want..
I want it to fetch the latest 10 transactions or messages :/
Posts: 218
Threads: 50
Joined: Dec 2017
Reputation:
0
No role of MYSQL, other than creating tables..
All the transactions will be saved.. BUT ONLY the latest 10 transactions of the player will be SHOWN
Posts: 912
Threads: 116
Joined: Jun 2012
Reputation:
0
Maybe start by creating a database... That part is self-explanatory, then start adding data that is specific for that person...
So say you have an account table and each person is given a separate ID (via auto-increment), you can use that ID (if you take it and store it for each player that logs in) and put that as one of the Data Values in the database for the SM/PM logs... Then you'll be able to "SELECT * FROM 'TABLE' WHERE User='%d' LIMIT (LIMIT NUMBER)" or as SyS pointed out... Start by learning SQL.
As an example.
ID (Auto-increment) | User (Integer) | (then your other data)
Posts: 218
Threads: 50
Joined: Dec 2017
Reputation:
0
Thanks, the LIMIT was what i wanted dude! +Rep