Re: Limiting results in a joined table
Hmm. I changed my query to this:
SELECT DISTINCT m.filename,m.fileid,m.parent,m.acl,m.display,m.filesize,m.resx,m.resy,m.duration,m.backup,m.backupstage,m.launchparms,m.mlcode,m.disporder,m.epname,m.bookmarks,m.added,m.lang_audio,m.lang_subs,m.episode,w.datewatched FROM media m LEFT OUTER JOIN watchlog w ON m.fileid = w.parent WHERE m.parent = 10188 ORDER BY m.disporder,m.filename,m.episode
I told it to be distinct on the filename as that is the part that duplicates. However, I still get dups because I am including w.datewatched. Problem is, datewatched data changes, there is no distinct result so I get back all the rows where I watched it different times. I need that row though to know whether or not it was watched so I can make the indicator light up or not next to the filename.
Does that make what I want impossible then?