SQL help.
#1

Hello there,

I am having problems with a bit of SQL.

Here is the problem:

I keep getting "Syntax Error's" and I don't know where from? I've checked the code for around 30 minutes, also the PHPMyAdmin table, for any error's in that.

Here is the code:

pawn Код:
format(query, sizeof(query), "UPDATE Accounts SET BanHour=%d, BanMinute=%d, Weapon1=%d, Weapon1A=%d, Weapon2=%d, Weapon2A=%d, Weapon3=%d, Weapon3A=%d, Weapon4=%d, Weapon4A=%d, Weapon5=%d, Weapon5A=%d, Weapon6=%d, Weapon6A=%d, Weapon7=%d, Weapon7A=%d WHERE Username='%s'",
    Player[playerid][BanHour],
    Player[playerid][BanMinute],
    GetPlayerWeaponData(playerid, 1, Player[playerid][Weapon1], Player[playerid][Weapon1a]),
    GetPlayerWeaponData(playerid, 2, Player[playerid][Weapon2], Player[playerid][Weapon2a]),
    GetPlayerWeaponData(playerid, 3, Player[playerid][Weapon3], Player[playerid][Weapon3a]),
    GetPlayerWeaponData(playerid, 4, Player[playerid][Weapon4], Player[playerid][Weapon4a]),
    GetPlayerWeaponData(playerid, 5, Player[playerid][Weapon5], Player[playerid][Weapon5a]),
    GetPlayerWeaponData(playerid, 6, Player[playerid][Weapon6], Player[playerid][Weapon6a]),
    GetPlayerWeaponData(playerid, 7, Player[playerid][Weapon7], Player[playerid][Weapon7a]),
    pname);
    mysql_query(query);
   
    format(query, sizeof(query), "UPDATE Accounts SET Weapon8=%d, Weapon8A=%d, Weapon9=%d, Weapon9A=%d, Weapon10=%d, Weapon10A=%d, Weapon11=%d, Weapon11A=%d, Weapon12=%d, Weapon12A=%d WHERE Username = '%s'",
    GetPlayerWeaponData(playerid, 8, Player[playerid][Weapon8], Player[playerid][Weapon8a]),
    GetPlayerWeaponData(playerid, 9, Player[playerid][Weapon9], Player[playerid][Weapon9a]),
    GetPlayerWeaponData(playerid, 10, Player[playerid][Weapon10], Player[playerid][Weapon10a]),
    GetPlayerWeaponData(playerid, 11, Player[playerid][Weapon11], Player[playerid][Weapon11a]),
    GetPlayerWeaponData(playerid, 12, Player[playerid][Weapon12], Player[playerid][Weapon12a]),
    pname);
    mysql_query(query);
If anyone at all can help me, I would be MOST grateful!

Thanks!
Reply


Messages In This Thread
SQL help. - by iGetty - 24.06.2012, 01:24
Re: SQL help. - by SuperViper - 24.06.2012, 02:11
Re: SQL help. - by iGetty - 24.06.2012, 02:41
Re: SQL help. - by phillip875 - 24.06.2012, 05:59
Re: SQL help. - by phillip875 - 24.06.2012, 06:20
Re: SQL help. - by iGetty - 29.06.2012, 16:52

Forum Jump:


Users browsing this thread: 1 Guest(s)