GetNextSQL Conversion/update Gstyle to BlueG?
#1

G'day!

I am just trying to make something simlilar to this.

pawn Code:
stock GetNextSQL(id[],table[])
{
    format(query,sizeof(query), "SELECT `%s` FROM `%s` ORDER BY `id` ASC", id,table);
    mysql_query(query);
    mysql_store_result();
    new str[256];
    new index = 0;
    new tmp;
    new firstresult;
    new tmpnum;
    if(mysql_num_rows() >= 1)
    {
        while(mysql_fetch_row(str) && !firstresult)
        {
            sscanf(str, "d", tmp);
            tmpnum = index+1;
            if(tmp == 0 && mysql_num_rows() == 1) firstresult = 1;
            else if(tmp == index && tmpnum == mysql_num_rows())
            {
                firstresult = tmpnum;
            }
            else if(tmp == index)
            {
                index++;
            }
            else
            {
                firstresult = index;
            }
        }
    }
    else firstresult = 0;
    return firstresult;
}
However as I believe this is from gstyyllllez Plugin with store_result ect, would someone please be able to show me a conversion or maybe something that does the same as this stock for BlueG's Pluggin and preferably threaded if possible!

Explanations on why or why not it can or can't be made would be great as well as an explanation as to how and what you converted would be great if it's not asking too much :P (Saves me from having to ask a similar question in a few days when I need something converted again :P)

Cheers!
Reply


Messages In This Thread
GetNextSQL Conversion/update Gstyle to BlueG? - by Deal-or-die - 15.05.2014, 05:00
Re : GetNextSQL Conversion/update Gstyle to BlueG? - by S4t3K - 15.05.2014, 09:49
Re: Re : GetNextSQL Conversion/update Gstyle to BlueG? - by Konstantinos - 15.05.2014, 10:03
Re: GetNextSQL Conversion/update Gstyle to BlueG? - by Deal-or-die - 15.05.2014, 15:07
Re: GetNextSQL Conversion/update Gstyle to BlueG? - by Campbell- - 15.05.2014, 16:51

Forum Jump:


Users browsing this thread: 2 Guest(s)