10.06.2016, 14:33
hi.i have this error in mysql:
and these are all codes about mysql in my gamemode:
plz help me.
Код:
[Fri Jun 10 18:57:32 2016] Connected (0) to x @ x via TCP/IP. [Fri Jun 10 18:57:32 2016] MySQL Server Version 5.5.50-cll. [Fri Jun 10 18:58:08 2016] Error (0): Failed to exeute query. 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 ''No' at line 1.
Код:
new MySQL:connection;
////ongamemodeinit/////
connection=mysql_init(LOG_ONLY_ERRORS,1);
mysql_connect("x","x","x","modernga_codaw",connection);
new handle[4096];
strcat(handle,"CREATE TABLE IF NOT EXISTS codbb_serverusers(Name VARCHAR(24),AID INT(10),Status INT(1),Ip VARCHAR(16),RegisterDate VARCHAR(10)");
strcat(handle,",Password VARCHAR(20),HashPW VARCHAR(129),AdminBan VARCHAR(24),ReasonBan VARCHAR(128),DateBan VARCHAR(10),BanTime INT(20),AdminLevel INT(1),VipLevel INT(1)");
strcat(handle,",VipTime INT(20),Score INT(15),Money INT(20),Kills INT(10),KillSpree INT(10),Deaths INT(10),DeathSpree INT(10),Ratio Float(20),Zones INT(10),ZoneSpree INT(10)");
strcat(handle,",Warn INT(1),ClanID INT(5),ClanName VARCHAR(24),ClanTag VARCHAR(6),ClanLevel INT(3),AirLicenseStatus INT(1),GroundLicenseStatus INT(1),AdminAirLicense VARCHAR(24)");
strcat(handle,",AdminGroundLicense VARCHAR(24),Registered INT(1),Jailed INT(1),Muted INT(1),Freezed INT(1),RconStatus INT(1),Clan INT(1),Leader INT(1),GroundLicense INT(1),AirLicense INT(1)");
strcat(handle,",SKILL_PISTOL INT(3),SKILL_PISTOL_SILENCED INT(3),SKILL_DESERT_EAGLE INT(3),SKILL_SHOTGUN INT(3),SKILL_SAWNOFF_SHOTGUN INT(3),SKILL_SPAS12_SHOTGUN INT(3),SKILL_MICRO_UZI INT(3)");
strcat(handle,",SKILL_MP5 INT(3),SKILL_AK47 INT(3),SKILL_M4 INT(3),SKILL_SNIPERRIFLE INT(3))");
mysql_query(handle);
Код:
///// in register ///////////////
new handle[4096];
strcat(handle,"INSERT INTO `codbb_serverusers`(Name,AID,Status,Ip,RegisterDate");
strcat(handle,",Password,HashPW,AdminBan,ReasonBan,DateBan,BanTime,AdminLevel,VipLevel");
strcat(handle,",VipTime,Score,Money,Kills,KillSpree,Deaths,DeathSpree,Ratio,Zones,ZoneSpree");
strcat(handle,",Warn,ClanID,ClanName,ClanTag,ClanLevel,AirLicenseStatus,GroundLicenseStatus,AdminAirLicense");
strcat(handle,",AdminGroundLicense,Registered,Jailed,Muted,Freezed,RconStatus,Clan,Leader,GroundLicense,AirLicense)");
format(str,sizeof(str),"VALUES('%s',%d,1,'%s','%s','%s','%s','None','None','None',0,0,0,0,0,100000,0,0,0,0,0.00,0,0,0,-1,'None','None',0,1,1,'None','None',1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)",PlayerName(playerid),dini_Int(file,"AID"),PlayerIp(playerid),dini_Get(file,"RegisterDate"),inputtext,buf);
strcat(handle,str);
mysql_query(handle);


