Jump to content

bran

Members
  • Posts

    6
  • Joined

  • Last visited

Posts posted by bran

  1. Update: The RSS links now just right to the topic in question.

    On that note, perhaps someone can help with the MYSQL syntax? I don't want to do a separate SELECT for each feature to see what the vote is. I have two tables, one with all the features, and one with the list of votes by IP, feature id, and vote.

    How can I get a MySQL SELECT statement to show all the rows from the features table, and if there is a matching row in the votes table (based ont he user's IP), show that, or NULL if no match.

    Something like:

    SELECT *

    FROM features

    LEFT OUTER JOIN votes ON features.feature_id = votes.feature_id AND votes.ip_address = 'users ip address'

    (I haven't tried this on MySql, but it's pretty standard SQL, so should work)

×
×
  • Create New...