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,
  recieved date NOT NULL,
  PRIMARY KEY  (k_id,ml_id)
) ENGINE=MyISAM;

+----+-----+-----------+
|c_id|aa_id|recieved   |
+----+-----+-----------+
|4   |2    |48642465464|
|4   |6    |35465432234|
|4   |15   |31354513213|
+----+-----+-----------+

I want now to match customers that got for example the advertisement umbrella but not the advertisement zippo.

No idea how to start that query.
On top of that is use the MySQL Version 3.23.54, for pc-linux (i686).

Anyone with any ideas?

I did try it with " WHERE (aa_id = 4) AND (aa_id != 6) GROUP BY c_id"

Also tried the HAVINg clause but that looked really false.

Thanks for any replies :)

Barry

--
Smileys rule (cX.x)C --o(^_^o)
Dance for me! ^(^_^)o (o^_^)o o(^_^)^ o(^_^o)

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to