15.05.2014, 05:00
G'day!
I am just trying to make something simlilar to this.
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!
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;
}
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!