25.02.2013, 23:52
I guess Nevermind, this works now, I changed the code to this and it works perfectly!
This thread can be closed
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;
}