MySQL.
#5

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;
}
Reply


Messages In This Thread
MySQL. - by JoelR - 27.12.2012, 20:45
Re: MySQL. - by Peach - 27.12.2012, 20:48
Re: MySQL. - by JoelR - 27.12.2012, 20:52
Re: MySQL. - by JoelR - 27.12.2012, 20:58
Re: MySQL. - by Peach - 27.12.2012, 21:08
Re: MySQL. - by JoelR - 27.12.2012, 21:28
Re: MySQL. - by Unte99 - 27.12.2012, 22:01
Re: MySQL. - by JoelR - 27.12.2012, 22:03
Re: MySQL. - by JoelR - 28.12.2012, 00:06
Re: MySQL. - by [HiC]TheKiller - 28.12.2012, 01:44

Forum Jump:


Users browsing this thread: 2 Guest(s)