PDA

View Full Version : last registered player mysql


COL
28/01/2014, 03:56 PM
nvm thx

gtakillerIV
28/01/2014, 04:04 PM
Well if you use IDs, you can do something like:



SELECT `Username` FROM `player_table` ORDER BY `ID` DESC LIMIT 1



There's really no need to get all of his data. You just want the username(I guess).

COL
30/01/2014, 09:44 AM
did not work and I don't use ids :s

Misiur
30/01/2014, 10:38 AM
Wait, what? What is your primary key in table? Name? Please attach screenshot of table structure (I hope you use phpmyadmin or some manager like mysql workbench)

anou1
30/01/2014, 10:44 AM
Well if you use IDs, you can do something like:



SELECT `Username` FROM `player_table` ORDER BY `ID` DESC LIMIT 1



There's really no need to get all of his data. You just want the username(I guess).


Hi,

I don't know how to solve COL's problem but, I want to know how can you extract and use the first username after you selected it.