30.01.2010, 03:30
Код:
stock SaveGroups()
{
new groupid;
mysql_real_escape_string(GroupInfo[groupid][gName], GroupInfo[groupid][gName]);
mysql_real_escape_string(GroupInfo[groupid][gOwner], GroupInfo[groupid][gOwner]);
mysql_query("SELECT * FROM `Groups`");
mysql_store_result();
if(mysql_num_rows() > 0)
{
while(mysql_fetch_row(array, "|"))
{
format(string, sizeof(string), "UPDATE `Groups` SET gMembers=%d, gPrivate=%d", GroupInfo[groupid][gMembers], GroupInfo[groupid][gPrivate]);
mysql_query(string);
strmid(GroupInfo[groupid][gName], GroupInfo[groupid][gName], 0, strlen(GroupInfo[groupid][gName]), 255);
strmid(GroupInfo[groupid][gOwner], GroupInfo[groupid][gOwner], 0, strlen(GroupInfo[groupid][gOwner]), 255);
strmid(GroupInfo[groupid][gPassword], GroupInfo[groupid][gPassword], 0, strlen(GroupInfo[groupid][gPassword]), 255);
}
}
mysql_free_result();
}
[23:29:47] MySQL Error: 'mysql_fetch_row' called when no result stored. But I stored the result =/

