01.12.2010, 20:08
Well that is a LOT of separate queries being executed extremely fast. Not sure it would cause the server to crash though, I'd recommend just doing one query, and working from that.
So now it's just one query that gets all of the information, and works with that. Should definitely help with processing time.
pawn Код:
stock LoadTempBans()
{
printf("[System] Loading Bans's....");
new line[1024];
mysql_query("SELECT * FROM `bans`");
mysql_store_result();
if(mysql_num_rows() > 0)
{
while(mysql_fetch_row(line))
{
sscanf(line,"p<|>ds[24]s[16]ds[75]",TempBans[id][Banid],TempBans[id][BannedName],TempBans[id][BannedIP],TempBans[id][UnbanDate],TempBans[id][Reason]);
if(strlen(TempBans[id][BannedName]) > 0) Bancount++;
}
}
return 1;
}