07.12.2011, 20:22
What you would probably do is something similar to what MdeRooy said. When you unban then, instead of deleting the line, mark it as inactive. Then you can just go find if there are any inactive bans first and fill them up.
pawn Code:
mysql_query("SELECT id FROM tablename WHERE inactive = 1 ORDER BY id DESC LIMIT 1");
mysql_store_result();
if(mysql_num_rows() == 1)
{
new query[200], id = mysql_fetch_int();
mysql_free_result();
format(query, sizeof(query), "UPDATE ..... WHERE id = %d", id);
mysql_query(query);
}
else
{
mysql_query("INSERT ..... ");
}