Forum Moderators: coopster
I would like to query the database to extract a list of the locations and only one of each location.
Then after getting this list I would like to query the same db again for results pertaining to just that location.
So something like this
$sql = "Get List of Locations"
$sql = "Show just one of each"
any help would be super, cheers
$query = "SELECT DISTINCT `location` FROM `table_name`";
You can refer to mysql's SELECT syntax [dev.mysql.com] for more information on distinct.