05.02.2018, 17:03
Godfather mode 2007)). I'm from Ukraine,I do not understand English well...
does not save data.
Mysql LOG'S : CMySQLQuery::Execute[] ERROR (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 'WHERE `hID` = '0'' at line 1.
and in general, the code is optimized?.does not preserve (((((
PHP код:
public OnPropUpdate()
{
new query[3000];
for(new h = 0; h < sizeof(HouseInfo); h++){
query = "UPDATE `accounts` SET ";
format(query, sizeof(query), "%s `x1` = '%2.f',", query, HouseInfo[h][hEntrancex]);
format(query, sizeof(query), "%s `y1` = '%2.f',", query, HouseInfo[h][hEntrancey]);
format(query, sizeof(query), "%s `z1` = '%2.f',", query, HouseInfo[h][hEntrancez]);
format(query, sizeof(query), "%s `x2` = '%2.f',", query, HouseInfo[h][hExitx]);
format(query, sizeof(query), "%s `y2` = '%2.f',", query, HouseInfo[h][hExity]);
format(query, sizeof(query), "%s `z2` = '%2.f',", query, HouseInfo[h][hExitz]);
format(query, sizeof(query), "%s `healthx` = '%i',", query, HouseInfo[h][hHealthx]);
format(query, sizeof(query), "%s `healthy` = '%i',", query, HouseInfo[h][hHealthy]);
format(query, sizeof(query), "%s `healthz` = '%i',", query, HouseInfo[h][hHealthz]);
format(query, sizeof(query), "%s `armourx` = '%i',", query, HouseInfo[h][hArmourx]);
format(query, sizeof(query), "%s `armoury` = '%i',", query, HouseInfo[h][hArmoury]);
format(query, sizeof(query), "%s `armourz` = '%i',", query, HouseInfo[h][hArmourz]);
format(query, sizeof(query), "%s `owner` = '%s',", query, HouseInfo[h][hOwner]);
format(query, sizeof(query), "%s `discription` = '%s',", query, HouseInfo[h][hDiscription]);
format(query, sizeof(query), "%s `value` = '%i',", query, HouseInfo[h][hValue]);
format(query, sizeof(query), "%s `hel` = '%i',", query, HouseInfo[h][hHel]);
format(query, sizeof(query), "%s `arm` = '%i',", query, HouseInfo[h][hArm]);
format(query, sizeof(query), "%s `int` = '%i',", query, HouseInfo[h][hInt]);
format(query, sizeof(query), "%s `lock` = '%i',", query, HouseInfo[h][hLock]);
format(query, sizeof(query), "%s `owned` = '%i',", query, HouseInfo[h][hOwned]);
format(query, sizeof(query), "%s `rooms` = '%i',", query, HouseInfo[h][hRooms]);
format(query, sizeof(query), "%s `rent` = '%i',", query, HouseInfo[h][hRent]);
format(query, sizeof(query), "%s `rentabil` = '%i',", query, HouseInfo[h][hRentabil]);
format(query, sizeof(query), "%s `takings` = '%i',", query, HouseInfo[h][hTakings]);
format(query, sizeof(query), "%s `vec` = '%i',", query, HouseInfo[h][hVec]);
format(query, sizeof(query), "%s `vcol1` = '%i',", query, HouseInfo[h][hVcol1]);
format(query, sizeof(query), "%s `vcol2` = '%i',", query, HouseInfo[h][hVcol2]);
format(query, sizeof(query), "%s `date` = '%i',", query, HouseInfo[h][hDate]);
format(query, sizeof(query), "%s `level` = '%i',", query, HouseInfo[h][hLevel]);
format(query, sizeof(query), "%s WHERE `hID` = '%d'", query, HouseInfo[h][hID]);
mysql_tquery(g_SQL, query, "", "");}
for(new b = 0; b < sizeof(BizzInfo); b++){
query = "UPDATE `accounts` SET ";
format(query, sizeof(query), "%s `owned` = '%i',", query, BizzInfo[b][bOwned]);
format(query, sizeof(query), "%s `owner` = '%s',", query, BizzInfo[b][bOwner]);
format(query, sizeof(query), "%s `message` = '%s',", query, BizzInfo[b][bMessage]);
format(query, sizeof(query), "%s `extortion` = '%s',", query, BizzInfo[b][bExtortion]);
format(query, sizeof(query), "%s `x` = '%2.f',", query, BizzInfo[b][bEntranceX]);
format(query, sizeof(query), "%s `y` = '%2.f',", query, BizzInfo[b][bEntranceY]);
format(query, sizeof(query), "%s `z` = '%2.f',", query, BizzInfo[b][bEntranceZ]);
format(query, sizeof(query), "%s `ex` = '%2.f',", query, BizzInfo[b][bExitX]);
format(query, sizeof(query), "%s `ey` = '%2.f',", query, BizzInfo[b][bExitY]);
format(query, sizeof(query), "%s `ez` = '%2.f',", query, BizzInfo[b][bExitZ]);
format(query, sizeof(query), "%s `levelneed` = '%i',", query, BizzInfo[b][bLevelNeeded]);
format(query, sizeof(query), "%s `buyprice` = '%i',", query, BizzInfo[b][bBuyPrice]);
format(query, sizeof(query), "%s `enter` = '%i',", query, BizzInfo[b][bEntranceCost]);
format(query, sizeof(query), "%s `till` = '%i',", query, BizzInfo[b][bTill]);
format(query, sizeof(query), "%s `lock` = '%i',", query, BizzInfo[b][bLocked]);
format(query, sizeof(query), "%s `int` = '%i',", query, BizzInfo[b][bInterior]);
format(query, sizeof(query), "%s `prods` = '%i',", query, BizzInfo[b][bProducts]);
format(query, sizeof(query), "%s `maxprods` = '%i',", query, BizzInfo[b][bMaxProducts]);
format(query, sizeof(query), "%s `priceprods` = '%i',", query, BizzInfo[b][bPriceProd]);
format(query, sizeof(query), "%s WHERE `bID` = '%d'", query, BizzInfo[b][bID]);
mysql_tquery(g_SQL, query, "", "");}
for(new sb = 0; sb < sizeof(SBizzInfo); sb++){
query = "UPDATE `accounts` SET ";
format(query, sizeof(query), "%s `owned` = '%i',", query, SBizzInfo[sb][sbOwned]);
format(query, sizeof(query), "%s `owner` = '%s',", query, SBizzInfo[sb][sbOwner]);
format(query, sizeof(query), "%s `message` = '%s',", query, SBizzInfo[sb][sbMessage]);
format(query, sizeof(query), "%s `extortion` = '%s',", query, SBizzInfo[sb][sbExtortion]);
format(query, sizeof(query), "%s `x` = '%2.f',", query, SBizzInfo[sb][sbEntranceX]);
format(query, sizeof(query), "%s `y` = '%2.f',", query, SBizzInfo[sb][sbEntranceY]);
format(query, sizeof(query), "%s `z` = '%2.f',", query, SBizzInfo[sb][sbEntranceZ]);
format(query, sizeof(query), "%s `levelneed` = '%i',", query, SBizzInfo[sb][sbLevelNeeded]);
format(query, sizeof(query), "%s `buyprice` = '%i',", query, SBizzInfo[sb][sbBuyPrice]);
format(query, sizeof(query), "%s `enter` = '%i',", query, SBizzInfo[sb][sbEntranceCost]);
format(query, sizeof(query), "%s `till` = '%i',", query, SBizzInfo[sb][sbTill]);
format(query, sizeof(query), "%s `lock` = '%i',", query, SBizzInfo[sb][sbLocked]);
format(query, sizeof(query), "%s `int` = '%i',", query, SBizzInfo[sb][sbInterior]);
format(query, sizeof(query), "%s `prods` = '%i',", query, SBizzInfo[sb][sbProducts]);
format(query, sizeof(query), "%s `maxprods` = '%i',", query, SBizzInfo[sb][sbMaxProducts]);
format(query, sizeof(query), "%s `priceprods` = '%i',", query, SBizzInfo[sb][sbPriceProd]);
format(query, sizeof(query), "%s WHERE `sbID` = '%d'", query, SBizzInfo[sb][sbID]);
mysql_tquery(g_SQL, query, "", "");}
return 1;
}
Mysql LOG'S : CMySQLQuery::Execute[] ERROR (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 'WHERE `hID` = '0'' at line 1.
and in general, the code is optimized?.does not preserve (((((