| Select distinct -
06-04-2007, 07:47 AM
Hi Folks
Here is my SQL code:
SELECT *
FROM Company
INNER JOIN `Properties`
ON `Company`.`Company_ID`=`Properties`.`Company_ID`
WHERE `Properties`.`Property` LIKE '%$clean_search%'
ORDER BY Country
ASC
What I want this to return is a list of all fields: Company & Country
from the table Company. However its returning the same company multiple
times when there are more than 1 Properties.Property LIKE
$clean_search.
What I want but I'm not actually sure if it can be done is a statement
like:
SELECT DISTINCT Company, *
Can this be done?
Thanks
A |