Ankündigung

Einklappen
Keine Ankündigung bisher.

MySQL - Syntaxfehler, aber wo?

Einklappen

Neue Werbung 2019

Einklappen
X
  • Filter
  • Zeit
  • Anzeigen
Alles löschen
neue Beiträge

  • MySQL - Syntaxfehler, aber wo?

    hallo ich war gar dabei ne code zu schreibn, die SQL anweisung sieht so aus:

    PHP-Code:
        $sql "INSERT INTO match                
                    (team1, points1, team2, points2, game, liga, map)            
                VALUES                
                    ('"
    .$_POST['team1']."',                
                    '"
    .$_POST['points1']."',                
                    '"
    .$_POST['team2']."',                
                    '"
    .$_POST['points2']."',                
                    '"
    .$_POST['game']."', 
                    '"
    .$_POST['liga']."', 
                    '"
    .$_POST['map']."')"
    ja und wenn das ding ausgeführt wird dann kommt folgende fehlermeldung:

    Error[UPDATE|match]:

    INSERT INTO match
    (team1, points1, team2, points2, game, liga, map)
    VALUES
    ('sde',
    '1',
    'afk',
    '29',
    'css',
    'esl',
    'de_dust2')

    MySQL-Error: 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 'match (team1, points1, team2, points2, game, liga, map) ' at line 1




    also ich weiß einfahc nich wo da der fehler sein soll, vielleicht kann mir ja einer von euch helfen

  • #2
    Hallo,

    ist match nicht ein SQL Befehl, der nicht gleichzeitig der Name einer Tabelle sein darf?

    Gruß
    Tine

    Kommentar


    • #3
      Guter Einwand, grad nachgeschlagen, Match is reserviert. Also: Bevorzugt garnicht erst Match als Tabellenname verwenden oder eben die guten Backticks: `match`

      Kommentar


      • #4
        oha danke... jetzt kalppts

        Kommentar

        Lädt...
        X