27.12.2012, 21:08
Just a quick example I wrote for you, this is completely untested but should give you a rough idea of what you're expecting.
pawn Код:
public LoadAdmins()
{
new admins[250], query[100];
format(query, sizeof(query), "SELECT * FROM `admins` WHERE `adminid` = '2' LIMIT 25"); // LIMIT OF 25.
mysql_query(query);
mysql_store_result();
new numberofadmins = mysql_num_rows();
for(new admins = 0; admins < numberofadmins; admins++)
{
while(mysql_retrieve_row())
{
mysql_fetch_field_row(admins, "Name"); /* Variables here */ = strval(admins);
mysql_fetch_field_row(admins, "Adminlevel"); /* Variables here */ = strval(admins);
admins ++;
}
}
mysql_free_result();
return true;
}