Originally Posted by daniel0816
When I query the database manually using SELECT * from table_name it shows that there are only two sets of data stored in the DB. Therefore when I run this query it should not repeat the data over and over, it should only display two sets of data in the HTML table.
Yes, but you have to remember that while you are joining tables, foreach of the corresponding records between tables you will pull a result. So if you have one lhs table with 2x records and a rhs table with 12x records, that will be 1 record for each corresponding match, or 24x records in total.
This is why I would have expected the distinct to work. That of course only applies to an *entire* row selection, so every property would have to match to be qualified as a duplicate. If even a single property is different than the row would be unique.