25.01.2013, 19:44
Hello, can anyone help me solve this error?
Script Code:
Debug Log
QueryDump Log
Tables created by navicat.
Server_Log
Script Code:
PHP код:
SaveHouses(const id){
if(strlen(HouseInfo[id][hOwner]) >= 1)
{
format(szLargeString, sizeof(szLargeString), "UPDATE houses SET Level = '%d', InteriorWorld = '%d', Description = '%s', Dono = '%s', ExteriorX = '%f', ExteriorY = '%f', ExteriorZ = '%f', ExteriorR = '%f', InteriorX = '%f', InteriorY = '%f', InteriorZ = '%f', InteriorR = '%f'",
HouseInfo[id][hLevel], HouseInfo[id][hHInteriorWorld], HouseInfo[id][hDescription], HouseInfo[id][hOwner], HouseInfo[id][hExteriorX], HouseInfo[id][hExteriorY], HouseInfo[id][hExteriorZ], HouseInfo[id][hExteriorR], HouseInfo[id][hInteriorX], HouseInfo[id][hInteriorY], HouseInfo[id][hInteriorZ], HouseInfo[id][hInteriorR]);
format(szLargeString, sizeof(szLargeString), "%s, Lock = '%d', Rentable = '%d', Rentfee = '%d', Valor = '%d', SafeMoney = '%d'",szLargeString, HouseInfo[id][hLock], HouseInfo[id][hRentable], HouseInfo[id][hRentFee], HouseInfo[id][hValue], HouseInfo[id][hSafeMoney]);
format(szLargeString, sizeof(szLargeString), "%s, Pot = '%d', Crack = '%d', Materials = '%d', Weapons1 = '%d', Weapons2 = '%d', Weapons3 = '%d', Weapons4 = '%d', Weapons5 = '%d'",szLargeString, HouseInfo[id][hPot], HouseInfo[id][hCrack], HouseInfo[id][hMaterials], HouseInfo[id][hWeapons][0], HouseInfo[id][hWeapons][1], HouseInfo[id][hWeapons][2], HouseInfo[id][hWeapons][3], HouseInfo[id][hWeapons][4]);
format(szLargeString, sizeof(szLargeString), "%s, GLUpgrade = '%d', PickupID = '%d', CustomInterior = '%d', CustomExterior = '%d', ExteriorA = '%f', InteriorA = '%f' WHERE hID = '%d'", szLargeString, HouseInfo[id][hGLUpgrade], HouseInfo[id][hPickupID], HouseInfo[id][hCustomInterior], HouseInfo[id][hCustomExterior], HouseInfo[id][hExteriorA], HouseInfo[id][hInteriorA], id);
mysql_query(szLargeString);
}
else {
return false;
}
return 1;
}
Код:
[18:28:15] CMySQLHandler::Query(resultID) - Threaded query with id 2 started. (Extra ID: 0) [18:28:15] CMySQLHandler::ProcessQueryThread() - Error will be triggered to OnQueryError() [18:28:15] OnQueryError() - Called. [18:28:49] >> mysql_query( Connection handle: 1 ) [18:28:49] CMySQLHandler::Query(UPDATE houses SET Level = '0', InteriorWorld = '0', Description = '(null)', Dono = '(null)', ExteriorX = '1526.401367', ExteriorY = '-1675.587646', ExteriorZ = '13.382812', ExteriorR = '0.000000', InteriorX = '0.000000', InteriorY = '0.000000', InteriorZ = '0.000000', InteriorR = '0.000000', Lock = '0', Rentable = '0', Rentfee = '0', Valor = '0', SafeMoney = '0', Pot = '0', Crack = '0', Materials = '0', Weapons1 = '0', Weapons2 = '0', Weapons3 = '0', Weapons4 = '0', Weapons5 = '0', GLUpgrade = '0', PickupID = '136', CustomInterior = '0', CustomExterior = '0', ExteriorA = '159.985794', InteriorA = '0.000000' WHERE hID = '1') - 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 'Lock = '0', Rentable = '0', Rentfee = '0', Valor = '0', SafeMoney = '0', Pot = '' at line 1) [18:28:49] >> mysql_query( Connection handle: 1 ) [18:28:49] CMySQLHandler::Query(UPDATE houses SET Level = '0', InteriorWorld = '0', Description = '(null)', Dono = '(null)', ExteriorX = '1526.401367', ExteriorY = '-1675.587646', ExteriorZ = '13.382812', ExteriorR = '0.000000', InteriorX = '0.000000', InteriorY = '0.000000', InteriorZ = '0.000000', InteriorR = '0.000000', Lock = '0', Rentable = '0', Rentfee = '0', Valor = '0', SafeMoney = '0', Pot = '0', Crack = '0', Materials = '0', Weapons1 = '0', Weapons2 = '0', Weapons3 = '0', Weapons4 = '0', Weapons5 = '0', GLUpgrade = '0', PickupID = '136', CustomInterior = '0', CustomExterior = '0', ExteriorA = '159.985794', InteriorA = '0.000000' WHERE hID = '1') - 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 'Lock = '0', Rentable = '0', Rentfee = '0', Valor = '0', SafeMoney = '0', Pot = '' at line 1) [18:28:49] OnQueryError() - Called. [18:28:49] OnQueryError() - Called.
Код:
[2013/1/25 - 18:40:51] UPDATE houses SET Level = '0', InteriorWorld = '0', Description = '(null)', Dono = '(null)', ExteriorX = '1519.109130', ExteriorY = '-1697.128540', ExteriorZ = '13.546875', ExteriorR = '0.000000', InteriorX = '0.000000', InteriorY = '0.000000', InteriorZ = '0.000000', InteriorR = '0.000000', Lock = '0', Rentable = '0', Rentfee = '0', Valor = '0', SafeMoney = '0', Pot = '0', Crack = '0', Materials = '0', Weapons1 = '0', Weapons2 = '0', Weapons3 = '0', Weapons4 = '0', Weapons5 = '0', GLUpgrade = '0', PickupID = '137', CustomInterior = '0', CustomExterior = '0', ExteriorA = '279.968963', InteriorA = '0.000000' WHERE hID = '2'
Код:
DROP TABLE IF EXISTS `houses`; CREATE TABLE `houses` ( `hID` int(11) NOT NULL AUTO_INCREMENT, `Level` int(11) NOT NULL DEFAULT '0', `InteriorWorld` int(11) NOT NULL DEFAULT '0', `Description` varchar(256) NOT NULL DEFAULT '(null)', `Dono` varchar(256) NOT NULL DEFAULT '(null)', `ExteriorX` varchar(256) NOT NULL DEFAULT '0.000000', `ExteriorY` varchar(256) NOT NULL DEFAULT '0.000000', `ExteriorZ` varchar(256) NOT NULL DEFAULT '0.000000', `ExteriorR` varchar(256) NOT NULL DEFAULT '0.000000', `InteriorX` varchar(256) NOT NULL DEFAULT '0.000000', `InteriorY` varchar(256) NOT NULL DEFAULT '0.000000', `InteriorZ` varchar(256) NOT NULL DEFAULT '0.000000', `InteriorR` varchar(256) NOT NULL DEFAULT '0.000000', `Lock` int(11) NOT NULL DEFAULT '0', `Rentable` int(11) NOT NULL DEFAULT '0', `Rentfee` int(11) NOT NULL DEFAULT '0', `Valor` int(11) NOT NULL DEFAULT '0', `SafeMoney` int(11) NOT NULL DEFAULT '0', `Pot` int(11) NOT NULL DEFAULT '0', `Crack` int(11) NOT NULL DEFAULT '0', `Materials` int(11) NOT NULL DEFAULT '0', `Weapons1` int(11) NOT NULL DEFAULT '0', `Weapons2` int(11) NOT NULL DEFAULT '0', `Weapons3` int(11) NOT NULL DEFAULT '0', `Weapons4` int(11) NOT NULL DEFAULT '0', `Weapons5` int(11) NOT NULL DEFAULT '0', `GLUpgrade` int(11) NOT NULL DEFAULT '0', `PickupID` int(11) NOT NULL DEFAULT '0', `CustomInterior` int(11) NOT NULL DEFAULT '0', `CustomExterior` int(11) NOT NULL DEFAULT '0', `InteriorA` varchar(256) NOT NULL DEFAULT '0.000000', `ExteriorA` varchar(256) NOT NULL DEFAULT '0.000000', PRIMARY KEY (`hID`) ) ENGINE=InnoDB AUTO_INCREMENT=51 DEFAULT CHARSET=latin1;
Код:
[18:40:51] [MySQL] Query Error - (Thread: -1) (ExtraID: -1) (ErrorID: 1064) [18:40:51] [MySQL] Check /logs/querydump.log to review the query that threw the error. [18:40:51] [MySQL] Query Error - (Thread: -1) (ExtraID: -1) (ErrorID: 1064) [18:40:51] [MySQL] Check /logs/querydump.log to review the query that threw the error.