mysql not completing function
#1

I have a problem, mysql is not completing the function and idk why this is the log:

Quote:

[23:06:41] [DEBUG] mysql_tquery - connection: 1, query: "UPDATE `Teritorije` SET `Vlasnik` = 'Ballas' AND `Team` = '2' WH", callback: "OnQueryFinish", format: "i"
[23:06:41] [DEBUG] CMySQLQuery::Execute[OnQueryFinish] - starting query execution
[23:06:41] [DEBUG] CMySQLQuery::Execute[OnQueryFinish] - query was successfully executed within 0.312 milliseconds
[23:06:41] [DEBUG] CMySQLResult::CMySQLResult() - constructor called
[23:06:41] [DEBUG] Calling callback "OnQueryFinish"..
[23:06:41] [DEBUG] CMySQLResult::~CMySQLResult() - deconstructor called

lines:

pawn Код:
TerVreme = 7200;
                TerZauzeta = 1;

                NapadaTeritoriju[playerid] = 0;

                TeInfo[zoneid][Team] = TeInfo[zoneid][BandaNapada];

                TeInfo[zoneid][PodNapadom] = 0;
                TeInfo[zoneid][ZonaVreme] = 0;
                GangZoneStopFlashForAll(TerID[zoneid]);
                GangZoneShowForAll(TerID[zoneid], GetTeamZoneColor(TeInfo[zoneid][Team]));
               
                if(TeInfo[zoneid][Team] == 1)
                {
                    GangZoneShowForAll(TerID[zoneid], 0xFF00FF88);
                }
                else if(TeInfo[zoneid][Team] == 2)
                {
                    GangZoneShowForAll(TerID[zoneid], 0xFF00FF88);
                }
               
                new kveri[600], vlasnik[64];

                if(TeInfo[zoneid][Team] == 1) { vlasnik = "Grove Street Family"; }
                else if(TeInfo[zoneid][Team] == 2) { vlasnik = "Ballas"; }

                format(kveri, sizeof(kveri), "UPDATE `Teritorije` SET `Vlasnik` = '%s' AND `Team` = '%d' WHERE `ID` = '%d'", vlasnik, TeInfo[zoneid][Team], zoneid);
                mysql_function_query(konekt, kveri, true, "OnQueryFinish", "i", THREAD_OSTALO);
               
                KillTimer(TeInfo[zoneid][ZoneTimer]);
I thought it was bc query lenght but it is not, please help
Reply
#2

It should be %d, not '%d'. Quotation marks are only used in strings.
Reply
#3

i dont think it's about that i use WHERE `ID` = '%d' on every system that has that type of saving and it's working perfectly
Reply
#4

Anyone?
Reply
#5

Ignore debug logs as it never writes the full query. As long as it says "query was successfully executed" and it doesn't give any warning/error, it is fine.
Reply
#6

Yep, but the problem is, that it doesnt update database
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)