MySQL Top Money
#7

This section isn't for requesting scripts(shame on the people who flat out gave a script), it's for getting help with scripting. Take a look at:
Asking Good Questions

On Topic: You don't need to loop through all rows to get the account with the highest amount. You can limit and ORDER By to get the richest account in the first row.
pawn Код:
SELECT Cash, Username FROM accounts ORDER BY Cash DESC LIMIT 1
Assuming you're using BlueGs MySQL plugin, use mysql_tquery to send the query. In the query callback, you can use cache_* functions to get data from the first row(ex: cache_get_field_content_int(0, "Cash").
Reply


Messages In This Thread
[SOLVED] MySQL Top Money - by sampkinq - 22.08.2016, 19:35
Re: MySQL Top Money - by F1N4L - 22.08.2016, 19:43
Re: MySQL Top Money - by sampkinq - 22.08.2016, 19:50
Re: MySQL Top Money - by Isolated - 22.08.2016, 19:57
Re: MySQL Top Money - by F1N4L - 22.08.2016, 20:00
Re: MySQL Top Money - by sampkinq - 22.08.2016, 20:09
Re: MySQL Top Money - by Abagail - 22.08.2016, 20:10
Re: MySQL Top Money - by F1N4L - 22.08.2016, 20:24
Re: MySQL Top Money - by sampkinq - 22.08.2016, 20:24
Re: MySQL Top Money - by Shinja - 22.08.2016, 20:29

Forum Jump:


Users browsing this thread: 4 Guest(s)