Fehler bei DB-Erweiterung (mySQL)
Padarin
- datenbank
Hallo Leute,
ich bin heir völlig neu und habe auch gleich eine Frage / Problem:
Ich wollte mit folgendem SQL-Code meine DB (absolut frisch und jungfräulich) erweitern:
Code---------------------------------------------------------------
ALTER table admin_access ADD (infocenter int(1) default '0');
UPDATE table admin_access SET infocenter = 1 WHERE customers_id = 1;
CREATE TABLE infocenter_categories (
id int(11) NOT NULL default '0',
language_id int(11) NOT NULL default '0',
titel varchar(150) NOT NULL default '',
status
int(1) NOT NULL default '0',
position int(11) NOT NULL default '0',
PRIMARY KEY (id,language_id)
) TYPE=MyISAM;
CREATE TABLE infocenter_items (
id int(11) NOT NULL default '0',
language_id int(11) NOT NULL default '0',
categories_id int(11) NOT NULL default '0',
title varchar(150) NOT NULL default '',
name varchar(200) NOT NULL default '',
description text NOT NULL,
status
int(1) NOT NULL default '0',
position int(11) NOT NULL default '0',
PRIMARY KEY (id,language_id)
) TYPE=MyISAM;
CREATE TABLE infocenter_start (
id int(1) NOT NULL default '0',
language_id int(11) NOT NULL default '0',
description text NOT NULL,
PRIMARY KEY (id,language_id)
) TYPE=MyISAM;
Code---------------------------------------------------------------
und bekomme folgenden Fehler im phpMyAdmin ausgespuckt:
Fehlermeldung------------------------------------------------------
Fehler:
SQL-Befehl:
UPDATE TABLE admin_access SET infocenter =1 WHERE customers_id =1
MySQL meldet:
#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 'table admin_access SET infocenter = 1 WHERE customers_id = 1' a
Fehlermeldung------------------------------------------------------
Hat einer einen Tipp für mich was da schief gelaufen ist bzw. was zu tun ist?
Ich habe es auch noch mit :
Code---------------------------------------------------------------
UPDATE TABLE admin_access SET infocenter = '1' WHERE customers_id = '1';
Code---------------------------------------------------------------
probiert - da gibts den gleichen Fehler dann in gün:
Code:
Fehlermeldung------------------------------------------------------
Fehler:
SQL-Befehl:
UPDATE TABLE admin_access SET infocenter = '1' WHERE customers_id = '1'
MySQL meldet:
#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 'TABLE admin_access SET infocenter = '1' WHERE customers_id = '1
Fehlermeldung------------------------------------------------------
Was ist falsch an dem SQL-Code? Was bedeutet der Fehler? Wie lautet der korrekte Code?
Herzlichen Dank, Padarin
hi,
UPDATE TABLE admin_access SET infocenter =1 WHERE customers_id =1
MySQL meldet:
#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 'table admin_access SET infocenter = 1 WHERE customers_id = 1' a
Das Schlüsselwort TABLE ist an der Stelle einfach fehl am Platze.
UPDATE admin_access SET infocenter =1 WHERE customers_id =1
gruß,
wahsaga
Ich habe das Schlüsselwort TABLE nun weggelassen und es wird gemeldet:Ihr SQL-Befehl wurde erfolgreich ausgeführt.
Aber was hat "# MySQL lieferte ein leeres Resultat zurück (d.h. null Zeilen)." zu bedeuten? Ist das schlimm oder einfach normaaal ;)
Danke sagt Padarin!
----------------------------------------------------------------------
Ihr SQL-Befehl wurde erfolgreich ausgeführt.
SQL-Befehl:
ALTER TABLE admin_access ADD (
infocenter int( 1 ) default '0'
);# Betroffene Datensätze: 2
UPDATE admin_access SET infocenter =1 WHERE customers_id =1;# Betroffene Datensätze: 1
CREATE TABLE infocenter_categories(
id int( 11 ) NOT NULL default '0',
language_id int( 11 ) NOT NULL default '0',
titel varchar( 150 ) NOT NULL default '',
status
int( 1 ) NOT NULL default '0',
position int( 11 ) NOT NULL default '0',
PRIMARY KEY ( id, language_id )
) TYPE = MYISAM ;# MySQL lieferte ein leeres Resultat zurück (d.h. null Zeilen).
CREATE TABLE infocenter_items(
id int( 11 ) NOT NULL default '0',
language_id int( 11 ) NOT NULL default '0',
categories_id int( 11 ) NOT NULL default '0',
title varchar( 150 ) NOT NULL default '',
name varchar( 200 ) NOT NULL default '',
description text NOT NULL ,
status
int( 1 ) NOT NULL default '0',
position int( 11 ) NOT NULL default '0',
PRIMARY KEY ( id, language_id )
) TYPE = MYISAM ;# MySQL lieferte ein leeres Resultat zurück (d.h. null Zeilen).
CREATE TABLE infocenter_start(
id int( 1 ) NOT NULL default '0',
language_id int( 11 ) NOT NULL default '0',
description text NOT NULL ,
PRIMARY KEY ( id, language_id )
) TYPE = MYISAM ;# MySQL lieferte ein leeres Resultat zurück (d.h. null Zeilen).
----------------------------------------------------------------------
hi,
UPDATE TABLE admin_access SET infocenter =1 WHERE customers_id =1
MySQL meldet:
#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 'table admin_access SET infocenter = 1 WHERE customers_id = 1' a
Das Schlüsselwort TABLE ist an der Stelle einfach fehl am Platze.
UPDATE admin_access SET infocenter =1 WHERE customers_id =1
gruß,
wahsaga
hi,
Ich habe das Schlüsselwort TABLE nun weggelassen und es wird gemeldet:Ihr SQL-Befehl wurde erfolgreich ausgeführt.
Du hast also erfolgreich ein UPDATE gemacht.
Aber was hat "# MySQL lieferte ein leeres Resultat zurück (d.h. null Zeilen)." zu bedeuten? Ist das schlimm oder einfach normaaal ;)
UPDATE verändert Datensätze, aber es liefert keine zurück.
gruß,
wahsaga