getting the max int from a mysql column
#5

Your confusing me... You have:
pawn Код:
if(slot <= 0) slot = 0;
    return slot+1;
Meaning equals 0 or less than 0 then set to one.

So I suggest that:
pawn Код:
mysql_query("SELECT MAX(Banid) FROM Bans");
That is already 0 or less.

and return slot+1 will set to 1. Setting something to 0 and adding 1 trying to get higher than 1 will not work.
Reply


Messages In This Thread
getting the max int from a mysql column - by The_Gangstas - 28.12.2010, 04:56
Re: getting the max int from a mysql column - by willsuckformoney - 28.12.2010, 05:14
Re: getting the max int from a mysql column - by The_Gangstas - 28.12.2010, 05:16
Re: getting the max int from a mysql column - by Austin - 28.12.2010, 05:22
Re: getting the max int from a mysql column - by willsuckformoney - 28.12.2010, 05:22
Re: getting the max int from a mysql column - by Calgon - 28.12.2010, 07:22

Forum Jump:


Users browsing this thread: 1 Guest(s)