MySQL look for missing ratings

Posted by Dustin on Stack Overflow See other posts from Stack Overflow or by Dustin
Published on 2010-05-19T14:39:12Z Indexed on 2010/05/19 14:40 UTC
Read the original article Hit count: 176

Filed under:

Hopefully I can ask this without being confusing. I am a photographer and I am having some of our clients rate pictures that we have taken. We have hundreds of pictures in our portfolio that they may be rating. What I want to do is ask our clients to rate pictures again, but only show them the pictures they haven't yet rated. I currently have three tables: one that stores the actual ratings, one that stores the pictures (or location of each picture), and one that stores the information about the rater. I'm using codeigniter for my db management, if that helps at all. What I have so far is this:

"SELECT * FROM ratings LEFT JOIN portfolio ON ratings.portfolioid = portfolio.portfolioid"

This will give me a row for each rating, but won't show me where a rating is missing for a picture. Thanks in advance!

© Stack Overflow or respective owner

Related posts about mysql