Re: Problem searching in grouped rows

2006-06-29 Thread Barry
Brent Baisley schrieb: I'll give it a shot. First, select the people that got the first advertisement: SELECT c_id,aa_id FROM adverticelink WHERE aa_id=4 From that result, you want to additionally filter out who didn't get the second advertisement. Since that information is contained in the

Re: Problem searching in grouped rows

2006-06-26 Thread Brent Baisley
1 LEFT JOIN adverticelink AS a2 ON (a1.c_id=a2.c_id AND a2.aa_id=6) WHERE a1.aa_id=4 AND a2.aa_id IS NULL That should work in 3.23. - Original Message - From: "Barry" <[EMAIL PROTECTED]> To: Sent: Monday, June 26, 2006 3:58 AM Subject: Re: Problem searching in grouped r

Re: Problem searching in grouped rows

2006-06-26 Thread Barry
Barry schrieb: Hello everyone! I have a problem with matching in grouped rows. I have: - one DB with customers - one DB with advertisement articles - one DB that holds what customer got which article the linked DB looks like: CREATE TABLE adverticlelink ( c_id int(11) NOT NULL, aa_id int(

Problem searching in grouped rows

2006-06-21 Thread Barry
Hello everyone! I have a problem with matching in grouped rows. I have: - one DB with customers - one DB with advertisement articles - one DB that holds what customer got which article the linked DB looks like: CREATE TABLE adverticlelink ( c_id int(11) NOT NULL, aa_id int(11) NOT NULL,