MySQL Query, Issue. Won't delete fields.
#1

pawn Код:
new query[128];
        format(query, sizeof(query), "DELETE VehModel, VehOwner, VehSpawnX, VehSpawnY, VehSpawnZ,VehSpawnAngle, VehColour1, VehColour2, VehFuel, VehPlate, VehWep1,VehWepA1,VehWep2,VehWepA2, VehCash, VehArmour, VehFaction, VehFRank, VehOwned, VehFactioned FROM `vehicles` WHERE `id` = %d", VehicleSQLID[vehicleid]);
        mysql_query(query);
        new rows = mysql_affected_rows();
       
        if(rows > 0)
        {
            new string[128];
            format(string, sizeof(string), "{FF0000}Vehicle Deleted.");
            strcat(string, "Vehicle Server ID: {FF0000}%d", vehicleid);
            strcat(string, "Vehicle MySQL ID: {FF0000}%d", VehicleSQLID[vehicleid]);
            strcat(string, "Next Free SQLID: {FF0000}%d", GetFreeMySQLSlot("vehicles"));
            SendClientMessage(playerid, COLOUR_WHITE, string);
        }
Not sure why it won't delete.

Quote:

[03:20:33] mysql 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 '' at line 1
The line in question is the query itself.
Reply


Messages In This Thread
MySQL Query, Issue. Won't delete fields. - by Dokins - 10.12.2013, 02:24
Re: MySQL Query, Issue. Won't delete fields. - by arakuta - 10.12.2013, 02:32
Re: MySQL Query, Issue. Won't delete fields. - by Dokins - 10.12.2013, 02:34

Forum Jump:


Users browsing this thread: 1 Guest(s)