FUNKAM35 Posted May 6, 2014 Share Posted May 6, 2014 Hi I need to select a distinct variable $area from the table property I also need to select the variable $location from the same table so it gives the array $area/$location Select distinct area from property Select location from property where $area =`area` How can I string the two together Many Thanks Link to comment https://forums.phpfreaks.com/topic/288289-select-distinct-variable-and-another-variable/ Share on other sites More sharing options...
ginerjm Posted May 6, 2014 Share Posted May 6, 2014 This makes no sense. How about explaining in plain English? Link to comment https://forums.phpfreaks.com/topic/288289-select-distinct-variable-and-another-variable/#findComment-1478476 Share on other sites More sharing options...
gizmola Posted May 6, 2014 Share Posted May 6, 2014 All I can guess is that you want a list of distinct area/location combinations? SELECT DISTINCT area,location FROM property You can also accomplish this with GROUP BY SELECT area, location FROM property GROUP BY area, location Link to comment https://forums.phpfreaks.com/topic/288289-select-distinct-variable-and-another-variable/#findComment-1478489 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.