04.12.2010, 08:36
After viewing mysql logs, I noticed an error, error ID: 1064.
Error Message:
Pawn Code:
Error Message:
Quote:
CMySQLHandler::Query(UPDATE houses SET location='',howner='',lock=0,insurance=0,insurance refund=0,buyable=0,houseinterior=0,vworld=0,rent=0 ,rentable=0,locked=0,safe=0,mats=0,drugs=0,owned=0 ,price=0 WHERE houseid=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,insurance=0,insurancerefund=0,buyable=0,ho useinterior=0,vworld=0,rent=0,r' at line 1) |
pawn Код:
public MySQLSaveHouse(houseid)
{
MySQLCheckConnection();
format(query, MAX_STRING, "UPDATE houses SET ");
MySQLUpdateFlo(query, HouseInfo[houseid][hSQLID], "garage_entrance_x", HouseInfo[houseid][hGEntrancex], MYSQL_ID_HOUSE);
MySQLUpdateFlo(query, HouseInfo[houseid][hSQLID], "garage_entrance_y", HouseInfo[houseid][hGEntrancey], MYSQL_ID_HOUSE);
MySQLUpdateFlo(query, HouseInfo[houseid][hSQLID], "garage_entrance_z", HouseInfo[houseid][hGEntrancez], MYSQL_ID_HOUSE);
MySQLUpdateFlo(query, HouseInfo[houseid][hSQLID], "garage_exit_x", HouseInfo[houseid][hGExitx], MYSQL_ID_HOUSE);
MySQLUpdateFlo(query, HouseInfo[houseid][hSQLID], "garage_exit_y", HouseInfo[houseid][hGExity], MYSQL_ID_HOUSE);
MySQLUpdateFlo(query, HouseInfo[houseid][hSQLID], "garage_exit_z", HouseInfo[houseid][hGExitz], MYSQL_ID_HOUSE);
MySQLUpdateFlo(query, HouseInfo[houseid][hSQLID], "garage_angle1", HouseInfo[houseid][hGAngle1], MYSQL_ID_HOUSE);
MySQLUpdateFlo(query, HouseInfo[houseid][hSQLID], "garage_angle2", HouseInfo[houseid][hGAngle2], MYSQL_ID_HOUSE);
MySQLUpdateInt(query, HouseInfo[houseid][hSQLID], "garage_exists", HouseInfo[houseid][hGGarage], MYSQL_ID_HOUSE);
MySQLUpdateInt(query, HouseInfo[houseid][hSQLID], "garage_locked", HouseInfo[houseid][hGLock], MYSQL_ID_HOUSE);
MySQLUpdateInt(query, HouseInfo[houseid][hSQLID], "garage_interior", HouseInfo[houseid][hGInt], MYSQL_ID_HOUSE);
MySQLUpdateInt(query, HouseInfo[houseid][hSQLID], "garage_world", HouseInfo[houseid][hGWorld], MYSQL_ID_HOUSE);
MySQLUpdateFlo(query, HouseInfo[houseid][hSQLID], "entrance_x", HouseInfo[houseid][hEntrancex], MYSQL_ID_HOUSE);
MySQLUpdateFlo(query, HouseInfo[houseid][hSQLID], "entrance_y", HouseInfo[houseid][hEntrancey], MYSQL_ID_HOUSE);
MySQLUpdateFlo(query, HouseInfo[houseid][hSQLID], "entrance_z", HouseInfo[houseid][hEntrancez], MYSQL_ID_HOUSE);
MySQLUpdateFlo(query, HouseInfo[houseid][hSQLID], "exit_x", HouseInfo[houseid][hExitx], MYSQL_ID_HOUSE);
MySQLUpdateFlo(query, HouseInfo[houseid][hSQLID], "exit_y", HouseInfo[houseid][hExity], MYSQL_ID_HOUSE);
MySQLUpdateFlo(query, HouseInfo[houseid][hSQLID], "exit_z", HouseInfo[houseid][hExitz], MYSQL_ID_HOUSE);
MySQLUpdateStr(query, HouseInfo[houseid][hSQLID], "description", HouseInfo[houseid][hDescription], MYSQL_ID_HOUSE);
// Not updating below here.
MySQLUpdateStr(query, HouseInfo[houseid][hSQLID], "location", HouseInfo[houseid][hLocation], MYSQL_ID_HOUSE);
MySQLUpdateStr(query, HouseInfo[houseid][hSQLID], "howner", HouseInfo[houseid][hOwner], MYSQL_ID_HOUSE);
MySQLUpdateInt(query, HouseInfo[houseid][hSQLID], "hlock", HouseInfo[houseid][hLock], MYSQL_ID_HOUSE);
MySQLUpdateInt(query, HouseInfo[houseid][hSQLID], "insurance", HouseInfo[houseid][hInsurance], MYSQL_ID_HOUSE);
MySQLUpdateInt(query, HouseInfo[houseid][hSQLID], "insurancerefund", HouseInfo[houseid][hInsuranceRefund], MYSQL_ID_HOUSE);
MySQLUpdateInt(query, HouseInfo[houseid][hSQLID], "buyable", HouseInfo[houseid][hBuyable], MYSQL_ID_HOUSE);
MySQLUpdateInt(query, HouseInfo[houseid][hSQLID], "houseinterior", HouseInfo[houseid][hInt], MYSQL_ID_HOUSE);
MySQLUpdateInt(query, HouseInfo[houseid][hSQLID], "vworld", HouseInfo[houseid][hWorld], MYSQL_ID_HOUSE);
MySQLUpdateInt(query, HouseInfo[houseid][hSQLID], "rentprice", HouseInfo[houseid][hRent], MYSQL_ID_HOUSE);
MySQLUpdateInt(query, HouseInfo[houseid][hSQLID], "rentable", HouseInfo[houseid][hRentable], MYSQL_ID_HOUSE);
MySQLUpdateInt(query, HouseInfo[houseid][hSQLID], "locked", HouseInfo[houseid][hLocked], MYSQL_ID_HOUSE);
MySQLUpdateInt(query, HouseInfo[houseid][hSQLID], "safe", HouseInfo[houseid][hSafe], MYSQL_ID_HOUSE);
MySQLUpdateInt(query, HouseInfo[houseid][hSQLID], "mats", HouseInfo[houseid][hMats], MYSQL_ID_HOUSE);
MySQLUpdateInt(query, HouseInfo[houseid][hSQLID], "drugs", HouseInfo[houseid][hDrugs], MYSQL_ID_HOUSE);
MySQLUpdateInt(query, HouseInfo[houseid][hSQLID], "owned", HouseInfo[houseid][hOwned], MYSQL_ID_HOUSE);
MySQLUpdateInt(query, HouseInfo[houseid][hSQLID], "price", HouseInfo[houseid][hPrice], MYSQL_ID_HOUSE);
MySQLUpdateFinish(query, HouseInfo[houseid][hSQLID], MYSQL_ID_HOUSE);
return 1;
}