Hello,

I have a little problem with this query:

Code:
 SELECT DISTINCT a.evenementId, a.evenementNaam, a.evenementType, b.vrstZaal, b.vrstDatum FROM evenementen a, voorstelling b WHERE 1=1 AND a.evenementId=b.vrstEvenementId ORDER BY a.evenementNaam ASC
I want to select unique evenementId's, but this query selects double evenementId's, it's just like the 'distinct' is ignored...

Tables:
Code:
 CREATE TABLE evenementen (
  evenementId int(7) NOT NULL auto_increment,
  evenementNaam varchar(80) NOT NULL default '',
  evenementType char(1) NOT NULL default '',
  PRIMARY KEY  (evenementId)
) TYPE=MyISAM;

CREATE TABLE voorstelling (
  vrstId int(7) NOT NULL auto_increment,
  vrstEvenementId int(7) NOT NULL default '0',
  vrstZaal int(7) NOT NULL default '0',
  vrstDatum varchar(10) NOT NULL default '',
  vrstTijd varchar(5) NOT NULL default '',
  vrstPrijs int(5) NOT NULL default '0',
  PRIMARY KEY  (vrstId)
) TYPE=MyISAM;