Mysql Errorid 1064
#1

Heey all,

I have this error in my server log:
Code:
EID: 1064 | Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL serverversion for the right syntax to use near ''users' SET 'Money' = 5000, 'Score' = 0, 'Admin' = 0, 'Kills' = 0, 'Deaths' = 0 ' at line 1 | Query: UPDATE 'users' SET 'Money' = 5000, 'Score' = 0, 'Admin' = 0, 'Kills' = 0, 'Deaths' = 0 WHERE Username 'Admigo'
My code:
pawn Code:
public OnPlayerConnect(playerid)
{
    mysql_format(gConnectionHandle,Query, "SELECT * FROM `users` WHERE 'Username' = '%s'", GetName(playerid));
    mysql_function_query(gConnectionHandle, Query, false , "CheckPlayer", "d", playerid);
    return 1;
}

public OnPlayerDisconnect(playerid, reason)
{
    mysql_format(gConnectionHandle, Query, "UPDATE 'users' SET 'Money' = %d, 'Score' = %d, 'Admin' = %d, 'Kills' = %d, 'Deaths' = %d WHERE Username '%e'",GetPlayerMoney(playerid),GetPlayerScore(playerid),PlayerInfo[playerid][pAdmin],PlayerInfo[playerid][pKills],PlayerInfo[playerid][pDeaths],GetName(playerid));
    mysql_function_query(gConnectionHandle, Query, false , "OnQueryFinish", "s", Query);
    return 1;
}
How to fix this?
I am using Mysql R14.

Admigo
Reply


Messages In This Thread
Mysql Errorid 1064 - by Admigo - 18.02.2013, 17:57
Re: Mysql Errorid 1064 - by Gamer_Z - 18.02.2013, 18:03
Re: Mysql Errorid 1064 - by Shaneisace - 18.02.2013, 18:04
Re: Mysql Errorid 1064 - by Admigo - 18.02.2013, 18:18
Re: Mysql Errorid 1064 - by Vince - 18.02.2013, 20:17
Re: Mysql Errorid 1064 - by Shaneisace - 19.02.2013, 02:26
Re: Mysql Errorid 1064 - by 3ventic - 19.02.2013, 09:03
Re: Mysql Errorid 1064 - by Admigo - 19.02.2013, 17:46
Re: Mysql Errorid 1064 - by Gamer_Z - 19.02.2013, 20:35
Re: Mysql Errorid 1064 - by BlackBank - 19.02.2013, 20:52

Forum Jump:


Users browsing this thread: 1 Guest(s)