25.10.2014, 12:49
Log:
mysql script:
in mysql doesn't insert:
Код:
format - connection: 1, len: 4098, format: "UPDATE `privateveh` SET `vModel` = %i, `vColor1` = %i, `vColor2` = %i, `vPrice` = %i, `vOwner` = '%s', `vPosX` = %f, `vPosY` = %..." [13:34:16] [DEBUG] mysql_tquery - connection: 1, query: "UPDATE `privateveh` SET `vModel` = 562, `vColor1` = 0, `vColor2`", callback: "(null)", format: "(null)" [13:34:16] [DEBUG] CMySQLQuery::Execute[] - starting query execution [13:34:16] [ERROR] CMySQLQuery::Execute[] - (error #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 '26.544064', '3.495696', '0')' at line 1 [13:34:16] [DEBUG] CMySQLQuery::Execute[] - starting query execution [13:34:16] [DEBUG] CMySQLQuery::Execute[] - query was successfully executed within 0.766 milliseconds [13:34:16] [DEBUG] CMySQLQuery::Execute[] - no callback specified, skipping result saving
Код:
stock SavePrivVeh(iVehicleID) { new SQL_vOwner[MAX_PLAYER_NAME], SQL_vPlate[32]; mysql_real_escape_string(vInfo[iVehicleID][vOwner], SQL_vOwner); mysql_real_escape_string(vInfo[iVehicleID][vPlate], SQL_vPlate); mysql_format(Mysql_users, query, sizeof(query), "UPDATE `privateveh` SET vModel = '%i', vColor1 = '%i', vColor2 = '%i', vPrice = '%i', vOwner = '%s', vPosX = '%f', vPosY = '%f', vPosZ = '%f', vPosA = '%f', vPlate = '%s', vPaintJ = '%i',\ vMod1 = '%i', vMod2 = '%i', vMod3 = '%i', vMod4 = '%i', vMod5 = '%i', vMod6 = '%i', vMod7 = '%i', vMod8 = '%i', vMod9 = '%i', vMod10 = '%i', vMod11 = '%i', vMod12 = '%i', Locked = '%i' WHERE vID = '%i' LIMIT 1", vInfo[iVehicleID][vModel], vInfo[iVehicleID][vColor1], vInfo[iVehicleID][vColor2], vInfo[iVehicleID][vPrice], SQL_vOwner, vInfo[iVehicleID][vPosX], vInfo[iVehicleID][vPosY], vInfo[iVehicleID][vPosZ], vInfo[iVehicleID][vPosA], SQL_vPlate, vInfo[iVehicleID][vPaintJ], vMods[iVehicleID][0], vMods[iVehicleID][1], vMods[iVehicleID][2], vMods[iVehicleID][3], vMods[iVehicleID][4], vMods[iVehicleID][5], vMods[iVehicleID][6], vMods[iVehicleID][7], vMods[iVehicleID][8], vMods[iVehicleID][9], vMods[iVehicleID][10], vMods[iVehicleID][11], vInfo[iVehicleID][vLocked], iVehicleID); mysql_tquery(Mysql_users, query, "", ""); return 1; }
Код:
mysql_format(Mysql_users, query, sizeof(query), "INSERT INTO `privateveh` (`vID`, `vModel`, `vColor1`, `vColor2`, `vPrice`, `vOwner`, `vPosX`, `vPosY`, `vPosZ`, `vPosA`, `vPaintJ`) VALUES ('%d', '%d', '%d', '%d', '%d', 'Unbought', '%f', '%f, '%f', '%f', '0')", Total_Veh_Created, ivModel, ivColors[0], ivColors[1], ivPrice, Pos[0], Pos[1], Pos[2], Pos[3]); mysql_tquery(Mysql_users, query, "", "");