SA-MP Forums Archive
[mysql] getting the highest integer in a column. - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [mysql] getting the highest integer in a column. (/showthread.php?tid=200960)



[mysql] getting the highest integer in a column. - The_Gangstas - 19.12.2010

how would i go about getting the highest integer in a column?

like there are 3 ban ids(rows) in a column i want to return the highest value in the column.
BlueG's plugin


Re: [mysql] getting the highest integer in a column. - XePloiT - 19.12.2010

from where you want to get it? samp.ban?


Re: [mysql] getting the highest integer in a column. - The_Gangstas - 19.12.2010

no from the mysql table

"Bans" the row is "Banid"


Re: [mysql] getting the highest integer in a column. - Marcel - 19.12.2010

SELECT MAX(banid) FROM bans


Re: [mysql] getting the highest integer in a column. - The_Gangstas - 19.12.2010

Quote:
Originally Posted by Marcel
View Post
SELECT MAX(banid) FROM bans
thank you very much. you made my day