SQL Help
#6

pawn Код:
SQL_SaveLicenses(playerid)
{
    if (!PlayerData[playerid][pLogged])
        return 0;

    static
        query[768];
         
    format(query, sizeof(query), "UPDATE `licenses` SET `licID` = '%d', `ownerID` = '%d', `issuerID` = '%d', `issueDate` = '%s' WHERE `ID` = '%d'",
        LicenseData[playerid][licID],
        LicenseData[playerid][ownerID],
        LicenseData[targetid][issuerID],
        LicenseData[playerid][issueDate]
    ); // ----> What is this semicolon? Remove it.
    mysql_function_query(g_iHandle, query, false, "", "");
    return 1;
}
everything seems fine except the bracket that you used with a semi colon, to be honest you don't even need to do it that way and I don't think it works like that in Pawn try using a round bracket instead of a curly one to close formats.

Quote:
Originally Posted by Luke_James
Посмотреть сообщение
Perhaps one of you could answer a question though?

PHP код:
    static 
        
query[768]; 
What should that number be? I've just put a random number in so I'm guessing it won't work as intended.
You count the character count and put how many characters were in the format including spaces.
Reply


Messages In This Thread
SQL Help - by Luke_James - 17.08.2015, 16:14
Re: SQL Help - by DaniceMcHarley - 17.08.2015, 16:20
Re: SQL Help - by arad55 - 17.08.2015, 16:26
Re: SQL Help - by Luke_James - 17.08.2015, 16:27
Re: SQL Help - by Luke_James - 17.08.2015, 16:31
Re: SQL Help - by DarkLored - 17.08.2015, 16:31
Re: SQL Help - by Luke_James - 17.08.2015, 16:36
Re: SQL Help - by DaniceMcHarley - 17.08.2015, 16:38
Re: SQL Help - by arad55 - 17.08.2015, 16:42
Re: SQL Help - by Luke_James - 17.08.2015, 16:43

Forum Jump:


Users browsing this thread: 1 Guest(s)