So, I have a MySQL error.
#1

pawn Код:
YCMD:checkfamilystrikes(playerid, params[], help){
    if(help){
        SendClientMessage(playerid, X11_WHITE, "Displays family strikes.");
        return 1;
    }
    new fid, sqlfid;
    if(!sscanf(params, "d", fid)){
        if(!IsValidFamily(fid)){
            sqlfid = SQLIDFromFamily(fid);
            format(query, sizeof(query), "SELECT `id`, `owner`, `strikedbyid`, `strikedbyname`, `strikereason` FROM `strikes` WHERE `type` = 1 AND `owner` = %d", sqlfid);
            mysql_function_query(g_mysql_handle, query, true, "onFamilyStrikeCheck", "dd", playerid, fid);
            return 1;
        } else {
            SendClientMessage(playerid, X11_TOMATO_2, "This is not a valid family!");
            return 1;
        }
    } else {
        SendClientMessage(playerid, X11_WHITE, "USAGE:/checkfamilystrikes [FamilyID]");
        return 1;
    }
    return 1;
}
The above code is the command I am using. The command fires and works correctly once, but then when I try it again it just returns "ERROR 1065: Query is empty", Anyone know the solution?
Reply
#2

Now it has moved to Error 1064. Interesting.

pawn Код:
SQL ERROR: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'S' at line 1
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)