MySQL Forums
Forum List  »  Newbie

Re: Limiting results in a joined table
Posted by: Doug Matthews
Date: July 15, 2015 07:48PM

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?

Options: ReplyQuote


Subject
Written By
Posted
Re: Limiting results in a joined table
July 15, 2015 07:48PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.