Erass¹ prieš 8 metus
Bet vistiek nesuprantu, anksčiau viskas tvarkoj buvo. Tiesiog perrašiau duomenų bazę ir nebeveikia. Nežinai, Bebrai, ką galėčiau padaryt/pakeist?
Erass¹ prieš 8 metus
[Query result]:|| UPDATE ServerJobsProfits
SET ||
Mano kodas buvo: printf("[Query result]:|| %s ||", Query);
Erass¹ prieš 8 metus
`stock SaveAllJobsProfit() { new TickCount = GetTickCount();
new Query[60 * MAX_FACTION_JOBS], Querys[100];
format(Querys, sizeof(Querys), "UPDATE `ServerioDarbuPelnai` SET ");
strcat(Query, Querys);
for(new i = 1; i < HowMuchFactionJobsIs + 1; i ++)
{
if(i != HowMuchFactionJobsIs)
{
format(Querys, sizeof(Querys), "`FactionJobProfit_%s` = '%f', ", FactionJobSystem[i][FactionJobName], FactionJobSystem[i][FactionJobProfit]);
strcat(Query, Querys);
}
else
{
format(Querys, sizeof(Querys), "`FactionJobProfit_%s` = '%f'", FactionJobSystem[i][FactionJobName], FactionJobSystem[i][FactionJobProfit]);
strcat(Query, Querys);
}
}
mysql_query(Query);
printf("[Jobs System]: Jobs profits saved in %dms\n", GetTickCount() - TickCount);
return 1;
}`
Erass¹ prieš 8 metus
`stock LoadAllJobsProfit() { new TickCount = GetTickCount();
new Query[260];
mysql_query("SELECT * FROM `ServerioDarbuPelnai`");
mysql_store_result();
mysql_fetch_row(Query);
sscanf(Query, "p<|>fffffffffffff",
FactionJobSystem[1][FactionJobProfit],
FactionJobSystem[2][FactionJobProfit],
FactionJobSystem[3][FactionJobProfit],
FactionJobSystem[4][FactionJobProfit],
FactionJobSystem[5][FactionJobProfit],
FactionJobSystem[6][FactionJobProfit],
FactionJobSystem[7][FactionJobProfit],
FactionJobSystem[8][FactionJobProfit],
FactionJobSystem[9][FactionJobProfit],
FactionJobSystem[10][FactionJobProfit],
FactionJobSystem[11][FactionJobProfit],
FactionJobSystem[12][FactionJobProfit],
FactionJobSystem[13][FactionJobProfit]
);
mysql_free_result();`
Tikiuosi šitas. Čia užkrovimas
Erass¹ prieš 8 metus
[16:52:12]
[16:52:12] ---------------------------
[16:52:12] MySQL Debugging activated (02/15/16)
[16:52:12] ---------------------------
[16:52:12]
[16:52:12] >> mysql_connect( )
[16:52:12] CMySQLHandler::CMySQLHandler() - constructor called.
[16:52:12] CMySQLHandler::CMySQLHandler() - Connecting to "127.0.0.1" | DB: "testavimas" | Username: "root" ...
[16:52:12] CMySQLHandler::Connect() - Connection was successful.
[16:52:12] CMySQLHandler::Connect() - Auto-Reconnect has been enabled.
[16:52:12] >> mysql_query( Connection handle: 1 )
[16:52:12] CMySQLHandler::Query(UPDATE ServerioDarbuPelnai
SET ) - An error has occured. (Error ID: 1064, You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 1)
[16:52:12] CMySQLHandler::~CMySQLHandler() - deconstructor called.
[16:52:12] CMySQLHandler::FreeResult() - The result is already empty.
[16:52:12] CMySQLHandler::Disconnect() - Connection was closed.