SELECT DISTINCT works like this:
Consider that the following information is rows in a table
May City1 State1 Location
May City1 State1 Location
A select distinct will return just one of the above rows since they are identical but
May City1 State1 Location
May City2 State1 Location
A select distinct here will return both rows because the rows are not identical albeit just the city is different.
Now, in both cases, say I do SELECT DISTINCT name from TABLE this will return 1 row all the time regardless of the data in other columns. (It should just return 1 instance of 'May')
It sounds like A)You have a problem with your query or B)Your loop is repeating itself. What I might suggest is executing the query directly in MySQL (not through PHP code) and see if you have just 4 rows returned, if you do your loop is messed up, if the query returns 6 rows then there is a problem with the query.
================================================== =========
I will only tell you how to do it, not do it for you.
Unless, of course, you want to hire me to do work for you.
================================================== =========
http://www.catb.org/~esr/faqs/smart-questions.html
^^Took that from planoie's profile
================================================== =========