MySQL Insert issue.
#1

I haven't really had this much trouble with SQL, and im completely stumped.

pawn Код:
public create_tspawn(playerid,String[])
{
    new Float:X, Float:Y, Float:Z, Float:A,Query[280];
    GetPlayerPos(playerid, X, Y, Z);
    GetPlayerFacingAngle(playerid, A);
    new Team = pInfo[playerid][pTeam];
    new Int = GetPlayerInterior(playerid);
    new VW = GetPlayerVirtualWorld(playerid);
    new Skin = GetPlayerSkin(playerid);
   
    format(Query, sizeof(Query), "INSERT INTO teamspawn (Name, PosX, PosY, PosZ, PosA, Team, Int, VW, Skin) VALUES('%s', %f, %f, %f, %f,%d,%d,%d,%d)", String, X,Y,Z,A,Team, Int, VW, Skin);
    mysql_query(Query);
    return 1;
}
Код:
[00:58:27] CMySQLHandler::Query(INSERT INTO teamspawn (Name, PosX, PosY, PosZ, PosA, Team, Int, VW, Skin) VALUES('hi', 1958.378295, 1343.157226, 15.374607, 269.142486,2,0,0,0)) - 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 'Int, VW, Skin) VALUES('hi', 1958.378295, 1343.157226, 15.374607, 269.142486,2,0,' at line 1)
Whats up?
Reply


Messages In This Thread
MySQL Insert issue. - by Shockey HD - 05.12.2013, 04:55
Re: MySQL Insert issue. - by Loot - 05.12.2013, 05:06
Re: MySQL Insert issue. - by Shockey HD - 05.12.2013, 05:13
Re: MySQL Insert issue. - by Jonesy96 - 05.12.2013, 06:30
Re: MySQL Insert issue. - by Vince - 05.12.2013, 07:19

Forum Jump:


Users browsing this thread: 1 Guest(s)