I designed a site awhile back, bugged, proofed the whole nine and everything worked fine before we went live. After six months or so, after a server upgrade I think, I got a complaint from a user that there were some duplicate entries showing up in certian sections. After looking into the code I've pin pointed it to my SQL JOINS, but I can't figure out why all the sudden their not working anymore.
More importantly I can't figure out how to pull only one line per result set. I know why it's pulling double entries, one from each table in the join. I can't figure out what i'm doing wronge how do I remove these duplicates from the query.
Help is greatly appreciated...
SELECT
TABLEA.id,
TABLEA.mem_id,
TABLEA.individual_list,
TABLEA.type1,
TABLEA.type2,
TABLEA.type3,
TABLEA.type4,
TABLEA.type5,
TABLEA.type6,
TABLEB.member_number,
TABLEB.first_name,
TABLEB.last_name
FROM TABLEA
INNER JOIN member_directory_la
ON TABLEA.mem_id = TABLEB.member_number
WHERE
TABLEA.individual_list='1'
AND
TABLEA.type1='1'
ORDER BY last_name ASC