[MySQL] Not fetching all groups
#3

I guess Nevermind, this works now, I changed the code to this and it works perfectly!

pawn Код:
stock loadGroups()
{
    new groupQuery[400];
    format(groupQuery, sizeof(groupQuery), "SELECT * FROM `groups`"); //Format the query, insert the information in again
    mysql_query(groupQuery); //Run the query

    mysql_store_result(); //Store the result

    new fetchVal[100], x; //A array to hold the data were going to get

    while(mysql_fetch_row(groupQuery)) //Loop through the columns
    {
            mysql_fetch_field("GroupID", fetchVal); //Fetch data from the column 'pAdmin' and save it to 'fetchVal'
            x = strval(fetchVal);

            mysql_fetch_field("GroupName", GroupInfo[x][GroupName]);

            mysql_fetch_field("Enabled", fetchVal);
            GroupInfo[x][Enabled] = strval(fetchVal);

            mysql_fetch_field("MOTD", GroupInfo[x][MOTD]);
    }
    mysql_free_result(); //Free the result
    return 1;
}
This thread can be closed
Reply


Messages In This Thread
[MySQL] Not fetching all groups - by [TC]XxJuggaloxX - 25.02.2013, 23:22
Re: [MySQL] Not fetching all groups - by [TC]XxJuggaloxX - 25.02.2013, 23:45
Re: [MySQL] Not fetching all groups - by [TC]XxJuggaloxX - 25.02.2013, 23:52

Forum Jump:


Users browsing this thread: 1 Guest(s)