Antworten auf deine Fragen:
Neues Thema erstellen

SQL Problem

C

citywebdesign

Guest

Bekomme bei folgenden Befehl
CREATE TABLE `sieq1_assets` (
`id` int(10) UNSIGNED NOT NULL COMMENT 'Primary Key',
`parent_id` int(11) NOT NULL DEFAULT '0'COMMENT AS `Nested set parent.`,
`lft` int(11) NOT NULL DEFAULT '0'COMMENT AS `Nested set lft.`,
`rgt` int(11) NOT NULL DEFAULT '0'COMMENT AS `Nested set rgt.`,
`level` int(10) UNSIGNED NOT NULL COMMENT 'The cached level in the nested tree.',
`name` varchar(50) NOT NULL COMMENT 'The unique name for the asset.\n',
`title` varchar(100) NOT NULL COMMENT 'The descriptive title for the asset.',
`rules` varchar(5120) NOT NULL COMMENT 'JSON encoded access control.'
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

diese Fehlermeldung
#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 'AS `Nested set parent.`,
`lft` int(11) NOT NULL DEFAULT '0'COMMENT AS `Nested ' at line 9

Komme leider nicht auf den Fehler drauf. Vielleicht kann mir da jemand helfen.

lg Benjamin
 

netbandit

Aktives Mitglied

Guten Morgen,

also wenn ich alle Backticks die einen Wert enthalten, z.B. bei den Kommentaren, durch ein Hochkomma und alle

COMMENT AS
durch
COMMENT

ersetze, funktioniert es.

Anm.: Wobei ich "COMMENT AS" gar nicht kenne und nirgend wo etwas finde wo es verwendet werden soll. Muss also nicht unbedingt falsch sein, bloß weil ich es nicht kenne.

Grüße :)
 
C

citywebdesign

Guest

Danke, aber das ist es nicht ich habe das schon probiert ohne Erfolg, dann bekomme ich diese Meldung
#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 '`Nested set parent.`,
`lft` int(11) NOT NULL DEFAULT '0'COMMENT `Nested set lf' at line 9
 

netbandit

Aktives Mitglied

Nestet set parent steht immer noch in Backticks...

Werte immer in Hochkommas packen, also statt

`Nested set parent.`

'Nested set parent.'

Gilt auch für die anderen Zeilen

Grüße :)
 
C

citywebdesign

Guest

Hatte ich auch schon gedacht aber auch da bekomme ich eine Fehlermeldung
#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 'AS 'Nested set parent.',
`lft` int(11) NOT NULL DEFAULT '0'COMMENT AS 'Nested ' at line 9
 
C

citywebdesign

Guest

Ne habe auch das probiert, dann bekomme ich halt diese Meldung
#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 'AS `FK to the #__assets table.`,
`parent_id` int(10) UNSIGNED NOT NULL DEFAULT' at line 9
 

netbandit

Aktives Mitglied

OK, vorgekaut...
PHP:
CREATE TABLE `sieq1_assets` (
`id` int(10) UNSIGNED NOT NULL COMMENT 'Primary Key',
`parent_id` int(11) NOT NULL DEFAULT '0' COMMENT 'Nested set parent.',
`lft` int(11) NOT NULL DEFAULT '0' COMMENT 'Nested set lft.',
`rgt` int(11) NOT NULL DEFAULT '0' COMMENT 'Nested set rgt.',
`level` int(10) UNSIGNED NOT NULL COMMENT 'The cached level in the nested tree.',
`name` varchar(50) NOT NULL COMMENT 'The unique name for the asset.\n',
`title` varchar(100) NOT NULL COMMENT 'The descriptive title for the asset.',
`rules` varchar(5120) NOT NULL COMMENT 'JSON encoded access control.'
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

...macht aber eigentlich keinen Sinn. Ich bin auch kein MyQSL-Profi, immer nur Copy & Paste nützt gar nix.

Grüße :)
 
C

citywebdesign

Guest

Danke, war aber ohne die '0' extra. Es hat jetzt zwar geklappt und es geht bis zu einer anderen Stelle. Ich werde mal schauen was da falsch ist.
 
Bilder bitte hier hochladen und danach über das Bild-Icon (Direktlink vorher kopieren) platzieren.
Antworten auf deine Fragen:
Neues Thema erstellen

Willkommen auf PSD-Tutorials.de

In unseren Foren vernetzt du dich mit anderen Personen, um dich rund um die Themen Fotografie, Grafik, Gestaltung, Bildbearbeitung und 3D auszutauschen. Außerdem schalten wir für dich regelmäßig kostenlose Inhalte frei. Liebe Grüße senden dir die PSD-Gründer Stefan und Matthias Petri aus Waren an der Müritz. Hier erfährst du mehr über uns.

Stefan und Matthias Petri von PSD-Tutorials.de

Nächster neuer Gratisinhalt

03
Stunden
:
:
25
Minuten
:
:
19
Sekunden

Neueste Themen & Antworten

Flatrate für Tutorials, Assets, Vorlagen

Zurzeit aktive Besucher

Statistik des Forums

Themen
118.565
Beiträge
1.538.067
Mitglieder
67.488
Neuestes Mitglied
Andrew56524
Oben