Re: Query matches twice, but not simultaneously...

2005-09-19 Thread Michael Stassen
Hobbs, Richard wrote: > Hello, > > I have two tables - one containing messages, and another containing links > between messages and other messages in a tree structure (much like a > threaded mailing list archiving thing). A single message can have > multiple "parents" though, meaning the links tab

Re: Query matches twice, but not simultaneously...

2005-09-19 Thread Hobbs, Richard
Hello, Perfect :-) Thank you, Hobbs. Quoting Peter Brawley <[EMAIL PROTECTED]>: Richard >I would like to display all messages which match both 5 and 7 in terms >of the parent_id, meaning messages 10 and 13 would be displayed. SELECT f1.child FROM foo AS f1 INNER JOIN foo AS f2 USING(child)

Re: Query matches twice, but not simultaneously...

2005-09-18 Thread Peter Brawley
Richard >I would like to display all messages which match both 5 and 7 in terms >of the parent_id, meaning messages 10 and 13 would be displayed. SELECT f1.child FROM foo AS f1 INNER JOIN foo AS f2 USING(child) WHERE f1.parent=5 AND f2.parent=7; PB - Hobbs, Richard wrote: Hello, I hav

Query matches twice, but not simultaneously...

2005-09-18 Thread Hobbs, Richard
Hello, I have two tables - one containing messages, and another containing links between messages and other messages in a tree structure (much like a threaded mailing list archiving thing). A single message can have multiple "parents" though, meaning the links table can have several entries for a