MySQL Syntax Error
#1

I am having trouble again, This time i cannot figure it out as this line is pretty much of long.

Код:
[07:37:25] CMySQLHandler::Query(VALUES('Sara_Washington', SHA1('ilovexenia'), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.0, 0.0, 0.0, 0.0, 0, 0, '192.168.1.100', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)) - An error has occured. (Error ID: 1064, 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 'VALUES('Sara_Washington', SHA1('ilovexenia'), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.0,' at line 1)
I believe it is a missing "," but i have checked it ~ Can't seem to find anything wrong on the code.

PHP код:
MySQL_Register(playeridpasswordstring[])
{
    new 
query1[750], string[2000];
    
strcat(string"INSERT INTO `players` (`username`, `password`, `age`, `sex`, `skin`, `regsteps`, `level`, `cash`, `helper`, `tester`, `admin`, `donor`, `posx`, `posy`, `posz`, `posa`, `posvw`, `posint`, `IP`, `gun0`, `gun1`, `gun2`, `gun3`, `gun4`, `gun5`, `gun6`, `gun7`, `gun8`, `gun9`, `gun10`, `gun11`, `ammo0`, `ammo1`, `ammo2`, `ammo3`, `ammo3`, `ammo4`, `ammo5`, `ammo6`, `ammo7`, `ammo8`, `ammo9`, `ammo10`, `ammo11`) ");
    
format(query1750"VALUES('%s', SHA1('%s'), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.0, 0.0, 0.0, 0.0, 0, 0, '%s', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)"GetName(playerid), passwordstringpInfo[playerid][pIP]);
    
strcat(stringquery1);
    
mysql_query(query1);
    
    
pInfo[playerid][pSkin] = 0;
    
pInfo[playerid][pLevel] = 1;
    
pInfo[playerid][pRegisterSteps] = 1;
    
SendClientMessage(playerid, -1"You have been registered to International Roleplay (Saved in to our SQL database)");
    
SetSpawnInfo(playeridNO_TEAMpInfo[playerid][pSkin], pInfo[playerid][pPos][0], pInfo[playerid][pPos][1], pInfo[playerid][pPos][2], pInfo[playerid][pPos][3], 000000);
    
SpawnPlayer(playerid);
    
    
pInfo[playerid][pLogged] = 1;
    return 
1;

Reply


Messages In This Thread
MySQL Syntax Error - by JaKe Elite - 19.05.2015, 23:32
Re: MySQL Syntax Error - by PowerPC603 - 19.05.2015, 23:47
Re: MySQL Syntax Error - by JaKe Elite - 20.05.2015, 00:25

Forum Jump:


Users browsing this thread: 1 Guest(s)