SA-MP Forums Archive
Mysql - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Mysql (/showthread.php?tid=629110)



Mysql - Loinal - 20.02.2017

Fixed


Re: Mysql - Loinal - 20.02.2017

Any help?


Re: Mysql - Mic_H - 20.02.2017

It is supposed to work.. Maybe the first one registered has the best score/money?


Re: Mysql - Yousha - 20.02.2017

Its because you are just selecting ONE (limit 1) and first record(by default)...
So I think it must be:

Код:
SELECT Username, Money FROM players GROUP BY Money DESC LIMIT 1;
or

Код:
SELECT Username, Money FROM players ORDER BY Money DESC LIMIT 1;



Re: Mysql - Loinal - 21.02.2017

Quote:
Originally Posted by Yousha
Посмотреть сообщение
Its because you are just selecting ONE (limit 1) and first record(by default)...
So I think it must be:

Код:
SELECT Username, Money FROM players GROUP BY Money DESC LIMIT 1;
Should i use group?
or

Код:
SELECT Username, Money FROM players ORDER BY Money DESC LIMIT 1;
Should i use group