Hallo,
ich habe mir die Ausgabe 2.02 gekauft und den Artikel Weltenbaum gelesen.
Dazu habe ich eine Frage.
Die Tabellendefinition ist:
create table regions (id int not null auto_increment primary key,
name varchar(100),not null,
parent int not null,
index(parent));
Und die Anfrage:
select distinct cities.name from regions as cities,
regions as states,regions as countries where cities.parent=states.id ...
Jetzt frage ich mich, habe ich was am Kopf, oder wie passt das zusammen?
Wie fragt man denn von einer Tabelle regions cities.name ab?
Ich bin ein völliger anfänger, aber irgendwie kommt mir das komisch vor????
ich habe mir die Ausgabe 2.02 gekauft und den Artikel Weltenbaum gelesen.
Dazu habe ich eine Frage.
Die Tabellendefinition ist:
create table regions (id int not null auto_increment primary key,
name varchar(100),not null,
parent int not null,
index(parent));
Und die Anfrage:
select distinct cities.name from regions as cities,
regions as states,regions as countries where cities.parent=states.id ...
Jetzt frage ich mich, habe ich was am Kopf, oder wie passt das zusammen?
Wie fragt man denn von einer Tabelle regions cities.name ab?
Ich bin ein völliger anfänger, aber irgendwie kommt mir das komisch vor????
Comment