[MySQL]: You have an error in your SQL syntax
#1

When I try to regsiter in my server the thing wont come up to pick my skin and when I look in logs I get this

** [MySQL]: 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 '= '', 'Warnings' = '0', 'Warn1' = 'NULL', 'Warn2' = 'NULL', 'MaskID' = '33470', ' at line 1
Reply
#2

Show your Query code
Reply
#3

What's that?
Reply
#4

Show your register code.
Reply
#5

Don't use '' around integers you only need to use them on strings.

also i think you either have an ' in a wrong location or you have 2 of them in the wrong location.
Reply
#6

I think this is it..

Код:
 );
	format(query, sizeof(query), "%s, 'Warnings' = '%d', 'Warn1' = '%s', 'Warn2' = '%s', 'MaskID' = '%d', 'FactionMod' = '%d', 'Capacity' = '%d' WHERE 'ID' = '%d'",
	    query,
	    PlayerData[playerid][pWarnings],
	    SQL_ReturnEscaped(PlayerData[playerid][pWarn1]),
	    SQL_ReturnEscaped(PlayerData[playerid][pWarn2]),
	    PlayerData[playerid][pMaskID],
	    PlayerData[playerid][pFactionMod],
	    PlayerData[playerid][pCapacity],
		PlayerData[playerid][pID]
	);
	mysql_function_query(g_iHandle, query, false, "", "");

	SQL_SaveAccessories(playerid);
	return 1;
}
Reply
#7

You don't use UPDATE, INSERT or any kind of other statement before anything else, plus you don't need that %s string in the front, and don't use ' ' they are for string specifiers only.
Reply
#8

Could someone fix it for me and paste to code here? Not really sure what you guys mean and now to correct it.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)