Hi, i have a problem with using union and group by together.
the following:
this returns in my dropdown:PHP Code:SELECT * FROM `table1` UNION SELECT * FROM `table2` WHERE metal = '1' GROUP BY width
the group by seems to work but only for one table at a time.Code:2 4 5 6 2 4 5 6
i would like it to work with both tables so it should only display 2,4, 5,6.
Any Ideas why its not working correctly?
Regards
David


Reply With Quote

Bookmarks