Problema en el syntax de mi query...
#1

Hola,
He tenido problemas al ejecutar este query:
Код:
format(playerQuery, sizeof(playerQuery), "INSERT INTO `Accounts`(AccountName, Password, IP, AdminLevel, Kills, Deaths, Score, Money, RegDate,LastOn,LastOnTime,Online) VALUES('%s', '%s', '%s', '0', '0', '0', '0', '0','%s','0','0','%d')", EscapeName(playerid), escpass, pIp, Date, PlayerInfo[playerid][Online]);
mysql_function_query(SQLConnection, playerQuery, false, "", "");
Error:
Код:
 Error ID: 1064 | Error: 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 ''0' at line 1 | Callback: | Query: INSERT INTO `Accounts`(AccountName, Password, IP, AdminLevel, Kills, Deaths, Score, Money, RegDate,LastOn,LastOnTime,Online) VALUES('LuiisRubio', '5E1BE64E87A559ADC69BFBC2ACD6F852E1F30870AC9650511B754693DFBE318B583EE66115A2AF62E471182567129B61557C20259CB3F248D52C64923FDBA2EE', '189.194.183.187', '0
Reply
#2

Solamente strings van entre apostrofes
Reply
#3

aumentale en celdas al array playerQuery
Reply
#4

el tuyo
PHP код:
format(playerQuerysizeof(playerQuery), "INSERT INTO `Accounts`(AccountName, Password, IP, AdminLevel, Kills, Deaths, Score, Money, RegDate,LastOn,LastOnTime,Online) VALUES('%s', '%s', '%s', '0', '0', '0', '0', '0','%s','0','0','%d')"EscapeName(playerid), escpasspIpDatePlayerInfo[playerid][Online]);
mysql_function_query(SQLConnectionplayerQueryfalse""""); 
el que te acabo de hacer
PHP код:
new playerQuery[190];
format(playerQuerysizeof(playerQuery), "INSERT INTO 'Accounts'(AccountName, Password, IP, AdminLevel, Kills, Deaths, Score, Money, RegDate,LastOn,LastOnTime,Online) VALUES('%s', '%s', '%s', '0', '0', '0', '0', '0','%s','0','0','%d')"EscapeName(playerid), escpasspIpDatePlayerInfo[playerid][Online]);
mysql_function_query(SQLConnectionplayerQueryfalse""""); 
prueba con ese creo que sonb 190 string (Los Conte)

Edit: tienes que tener en cuenta saber colocarle bien los signos tuyo
PHP код:
`Accounts
lo que modifique
PHP код:
'Accounts' 
Reply
#5

Ya lo arregle, gracias por su ayuda.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)