Hi everyone,

please have a look at the following query:

Code:
$q = "SELECT c.city_name, f.fruit_name, t.tree_name, fl.flower_name
FROM users AS u INNER JOIN
city AS c ON c.city_id = u.city_id INNER JOIN
fruits AS f ON f.fruit_id = u.fruit_id INNER JOIN
trees AS t ON t.tree_id = u.tree_id INNER JOIN
flowers AS fl ON fl.flower_id = u.flower_id 
WHERE c.city_name = 'LA' ";
This query would return something like:

apples
apples
apples
kiwis
kiwis
roses
roses
oak
oak
oak

What I want is only one instance of every fruit, flower and tree:

apples
kiwis
roses
oak

I probably can loop all fruits, flowers and trees into separate arrays and then chuck out duplicate rows but can I do this with SQL only? While I figure this out perhaps some kind soul can advise me on this.

Thank you!