hi,
i have the following database structure:
------------- ------------- ------------
| pilote | | flight | | airplane |
|-----------| |-----------| |----------|
| id | 1 ---- n | id | n ---- 1 | id |
| name | | id_pilote | | airplane |
------------- | id_flight | ------------
-------------
data in db:
-----------
1 | Philipp 1 | 1 | 1 1 | Boing747
... 2 | 1 | 3 2 | A300
... 3 | A320
...
if i want to find a pilote who flies with a Boing747 OR A320, i use this
statement (i know already the id's of the airplane):
"select pilote.name from pilote, flight where flight.id_pilote=pilote.id and
(fligth.id_flight=1 OR fligth.id_flight=3)"
this works without problems...
but, in this example "Philipp" flies with A320 AND Boing747. now i want to
find all pilotes who are flying with Boing 747 AND A320...
i can't reuse the statement from above and change the OR in an AND:
"select pilote.name from pilote, flight where flight.id_pilote=pilote.id and
(fligth.id_flight=1 AND fligth.id_flight=3)"
the second statement does not work. further i don't have the possiblity in
mysql to use 'subselects', 'union', 'intersect'. how do i resolve this
problem?
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php