18.12.2018, 23:31
I get this error
For this code
PHP код:
[01:26:07] [plugins/mysql] error #1064 while executing query "INSERT INTO `users` (`name`,`password`,`online`,`registered`,`level`,`ip`,`sex`,`country`,`age`,`skin`,`gps`,`learned`,`registerdate`,) VALUES('First_Second','D7FDC0E9FCB253FBFC8D87BDC13661824CC9C986586F7473C75D1D0105278887',1,1,'0','127.0.0.1','1','6','18','0','0','0','19/12/2018 - 01:26:07')": You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ') VALUES('First_Second','D7FDC0E9FCB253FBFC8D87BDC13661824CC9C986586F7473C75D1D01' at line 1
PHP код:
new y, m, d, hour, mmin, secc;
getdate(y, m, d); gettime(hour, mmin, secc);
new _regdate[25];
format(_regdate, sizeof _regdate, "%02d/%02d/%02d - %02d:%02d:%02d", d, m, y, hour, mmin, secc);
strmid(PlayerInfo[playerid][pRegisterDate], _regdate, 0, strlen(_regdate), 25);
mysql_format(SQL, query, sizeof(query),
"INSERT INTO `users` (`name`,`password`,`online`,`registered`,`level`,`ip`,`age`,`country`,`godine`,`skin`,`gps`,`learned`,`registerdate`,) \
VALUES('%s','%s',1,1,'%d','%s','%d','%d','%d','%d','%d','%d','%s')",
GetName(playerid), PlayerInfo[playerid][pPassword], PlayerInfo[playerid][pLevel], playersip, PlayerInfo[playerid][pSex], PlayerInfo[playerid][pCountry],
PlayerInfo[playerid][pYears], PlayerInfo[playerid][pSkin], PlayerInfo[playerid][pGPS], PlayerInfo[playerid][pLearned], PlayerInfo[playerid][pRegisterDate]);
mysql_tquery(SQL, query, "OnAccountRegister", "i", playerid);