DEVILofDARKNESS Posted September 2, 2009 Share Posted September 2, 2009 SELECT * FROM region_buildings INNER JOIN buildings ON buildings.building_id = region_buildings.building_id WHERE region_id = '$regionid'"; I want this query to be distinct but if I put DISTINCT after SELECT it keeps giving everything? Quote Link to comment https://forums.phpfreaks.com/topic/172842-solved-distinct/ Share on other sites More sharing options...
Maq Posted September 2, 2009 Share Posted September 2, 2009 What field(s) do you want to base your distinction on? Quote Link to comment https://forums.phpfreaks.com/topic/172842-solved-distinct/#findComment-910946 Share on other sites More sharing options...
DEVILofDARKNESS Posted September 2, 2009 Author Share Posted September 2, 2009 Sorry, I had uploaded the wrong file to my server, so the script actually was the same as it was before (without the DISTINCT change...) thanks to try to help me maq Quote Link to comment https://forums.phpfreaks.com/topic/172842-solved-distinct/#findComment-910949 Share on other sites More sharing options...
fenway Posted September 7, 2009 Share Posted September 7, 2009 FYI, DISTINCT is not generally useful with *. Quote Link to comment https://forums.phpfreaks.com/topic/172842-solved-distinct/#findComment-914148 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.