SuperSonik
Erfahrenes Mitglied
Hi Leute,
wie oben schon gesagt habe ich ein Problem einen Datensatz eine MySql - DB zu schreiben.
Ich hab in der Datenbank folgende Tabelle angelegt:
Feld Typ Null Standard Verweise Kommentare MIME
1 float Ja NULL
2 float Ja NULL
3 float Ja NULL
4 float Ja NULL
5 float Ja NULL
6 float Ja NULL
7 float Ja NULL
8 float Ja NULL
9 float Ja NULL
10 float Ja NULL
11 float Ja NULL
time datetime Ja 0000-00-00 00:00:00
Und daszu wollte ich mit folgendem Befehl Daten einfügen:
$sqlins = "INSERT INTO $tabellenname (1,2,3,4,5,6,7,8,9,10,11,time)
VALUES ($id_1, $id_2, $id_3, $id_4, $id_5, $id_6, $id_7, $id_8, $id_9, $id_10, $id_11, $timest);" ;
mysql_query($sqlins,$verbindung) or die("Fehler:".mysql_error($verbindung));
Aber ich bekomm' immer die Fehlermeldung:
Fehler: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 '1,2,3,4,5,6,7,8,9,10,11,time) VALUES (0, 0, 0, 0, 0, 0, 0, 0, 0, 20.2, 21.59, ' at line 1
Hat jemand ne Idee?
Gruß,
SuperSonik
wie oben schon gesagt habe ich ein Problem einen Datensatz eine MySql - DB zu schreiben.
Ich hab in der Datenbank folgende Tabelle angelegt:
Feld Typ Null Standard Verweise Kommentare MIME
1 float Ja NULL
2 float Ja NULL
3 float Ja NULL
4 float Ja NULL
5 float Ja NULL
6 float Ja NULL
7 float Ja NULL
8 float Ja NULL
9 float Ja NULL
10 float Ja NULL
11 float Ja NULL
time datetime Ja 0000-00-00 00:00:00
Und daszu wollte ich mit folgendem Befehl Daten einfügen:
$sqlins = "INSERT INTO $tabellenname (1,2,3,4,5,6,7,8,9,10,11,time)
VALUES ($id_1, $id_2, $id_3, $id_4, $id_5, $id_6, $id_7, $id_8, $id_9, $id_10, $id_11, $timest);" ;
mysql_query($sqlins,$verbindung) or die("Fehler:".mysql_error($verbindung));
Aber ich bekomm' immer die Fehlermeldung:
Fehler: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 '1,2,3,4,5,6,7,8,9,10,11,time) VALUES (0, 0, 0, 0, 0, 0, 0, 0, 0, 20.2, 21.59, ' at line 1
Hat jemand ne Idee?
Gruß,
SuperSonik