Jump to content

imri

New Members
  • Posts

    1
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

imri's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hey there! I need help writing a special SQL query. I have a table of Events, every event contains a user-id, which is the id of the creator. Every user in my website chooses 3 colors he likes. I want to select Events from the events table, ordering it by colors match - an event, which it's creator's colors match my colors best, will be "ranked" higher. For example, if John created an event X, and John's colors are Green, Red and Yellow, and my colors are Red, Orange and Yellow, his event will be higher in the results list, than event which Paul created, because Paul's favorite colors are Black, Blue and Red. There is a users-colors table, which consists of user-id and color-id. I hope I explained myself best. Thanks in advance!
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.