[ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0') - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0') (
/showthread.php?tid=608312)
[ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0') -
Morpheine - 30.05.2016
PHP код:
mysql_format(SQL, gQuery, sizeof(gQuery), "SELECT * FROM `friends` WHERE `AddBy` = '%d'", PlayerInfo[playerid][pSQLID]);
results = mysql_query(SQL, gQuery);
for(new i, j = cache_get_row_count (); i != j; ++i)
{
cache_get_field_content(i, "friendName", gString);
new userID = GetPlayerID(gString);
if(userID != INVALID_PLAYER_ID) onf ++;
}
cache_delete(results);
or
PHP код:
mysql_format(SQL, gQuery, sizeof(gQuery), "SELECT * FROM `friends` WHERE `AddBy` = '%d' AND `friendID` = '%d'", PlayerInfo[i][pSQLID], PlayerInfo[playerid][pSQLID]);
results = mysql_query(SQL, gQuery);
cache_get_field_content(0, "AddBy", gString);
Anyone help me please?
Re: [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0') -
iKevin - 30.05.2016
Stop multiposting and someone might help.