MYSQL INSERT Problem

Wichtiger Hinweis: Bitte ändert nicht manuell die Schriftfarbe auf schwarz sondern belasst es bei der Standardeinstellung. Somit tragt ihr dazu bei dass euer Text auch bei Verwendung unseren dunklen Forenstils noch lesbar ist!

Tipp: Ihr wollt längere Codeausschnitte oder Logfiles bereitstellen? Benutzt unseren eigenen PasteBin-Dienst Link
  • Nabend,
    habe hier einen Code der eig. etwas in die DB Bank eintragen soll.
    Doch leider geht es nicht. Hier der Code + Error
    stock CreateCarInDB(xID,zID,Float:X,Float:Y,Float:Z,Float:A,C1,C2)
    {
    new query[100];
    printf("%d",zID);
    format(query,sizeof(query),"INSERT INTO `cars` (VehicleID, Model, PositionX, PositionY, PositionZ, Angle, Color1, Color2) VALUES('%d','%d','%f','%f','%f','%f','%i','%i')",
    xID,
    zID,
    X,
    Y,
    Z,
    A,
    C1,
    C2);
    mysql_query(query);
    return 1;
    }


    LHandler::Query(INSERT INTO `cars` (VehicleID, Model, PositionX, PositionY, PositionZ, Angle, Color1, Color2) VALUE) - 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 '' at line 1)


    Ich bitte euch um Hilfe :)