14 Replies Latest reply on Jan 27, 2007 10:44 AM by namtax

    users who favourited this also favourited this

      hi i am trying to set up a system similar to amazons, whereby when you search a book, it tells you Customers who bought this item also bought these items( a list of other books)
      What i am trying to do is have a system which tells you "users who have favourited this musician have also favourited these artists"...
      At the moment I have a query which takes an artists primary id from the url of thier page, and the users primary id who favourited the artist, and puts this into a table, so then you can call the users fav artists, using

      SELECT *
      FROM artists_fav
      WHERE id_usr_fav=#SESSION.auth.idnumber#

      But im unsure of how to write a query that would take all the other artists that a user has, who has favourited "massive attack" for example, and present this in a list whereby the artist who has been favourited the most by users who have also favourited massive attack is at the top, then the next popular is second etc

      here my site


      and if you would like to test the favouriting system, you can use username blanko, and password dranko

      any help here would be MUCH appreciated