MySQL: Commands out of sync; you can't run this command now)
#1

pawn Код:
stock ShowOfflineMessages(playerid)
{
    new  message[128];
    new  month[24];
    new  Date;
    new  CharacterIDs;
    new  mSQLID;
    new  Month;

    format(string, sizeof(string), "SELECT * FROM offline_messages WHERE SQLID = '%d'", AccountData[playerid][pSQLID]);
    mysql_query(string);
    //mysql_fetch_row_format(line,"|");

    while(mysql_fetch_row_format(line,"|")) {
        sscanf(line, "p<|>iis[128]ii", mSQLID, CharacterIDs , message, Month, Date);

        switch(Month) {
            case 1: month = "January";
            case 2: month = "February";
            case 3: month = "March";
            case 4: month = "April";
            case 5: month = "May";
            case 6: month = "June";
            case 7: month = "July";
            case 8: month = "August";
            case 9: month = "September";
            case 10: month = "October";
            case 11: month = "November";
            case 12: month = "December";
        }

        SendClientMessage(playerid, COLOR_WHITE, " ");
        SendFormattedMessage(playerid, COLOR_YELLOW, "[Offline Message:] Date: %i %s Message: %s", Date, month, message);

        format(string, sizeof(string), "DELETE FROM offline_messages WHERE SQLID = '%d' ", mSQLID);
        mysql_query(string);
    }
    mysql_free_result();
}
Reply


Messages In This Thread
MySQL: Commands out of sync; you can't run this command now) - by armyoftwo - 04.12.2010, 16:42
Re: MySQL: Commands out of sync; you can't run this command now) - by xxmitsu - 04.12.2010, 16:44
Re: MySQL: Commands out of sync; you can't run this command now) - by armyoftwo - 04.12.2010, 16:53

Forum Jump:


Users browsing this thread: 2 Guest(s)