getting the max int from a mysql column
#1

pawn Код:
GetTempBanSlot()
{
    mysql_query("SELECT MAX(Banid) FROM Bans");
    mysql_store_result();
    new slot = mysql_fetch_int();
    mysql_free_result();
    if(slot <= 0) slot = 0;
    return slot+1;
}
it always returns 1.
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: 2 Guest(s)