List:General Discussion« Previous MessageNext Message »
From:Kazazic Almir Date:December 28 2000 3:04pm
Subject:select distinct with 2 tables
View as plain text  
this is OK:
SELECT COUNT(fl.ID) as nr 
FROM tr_front_page f, tr_front_language fl 
WHERE f.ID=fl.ID and fl.Locked IN ('F','S') and LngStatus='N' and
f.Ressort=1

but  :

SELECT COUNT(DISTINCT fl.ID) as nr 
FROM tr_front_page f, tr_front_language fl 
WHERE f.ID=fl.ID and fl.Locked IN ('F','S') and LngStatus='N' and
f.Ressort=1

hier I get always: 
MySQL Error: 1064 (You have an error in your SQL syntax near 'DISTINCT f.ID)
as nr FROM tr_front_page f, tr_front_language fl WHERE' at line 1)

have no idea why ? 
thanks almir


Thread
select distinct with 2 tablesKazazic Almir28 Dec
Re: select distinct with 2 tablesBob Hall30 Dec