I hope someone out there can give me some help with this. It's driving me crazy...
I want to compare one row against the others in a table. The aim of the project is to create a recommended list (if you like this then you'll love this.)
There are a number of t-shirts in the db and they fall into one or more categories. The categories table contains the ID of the t-shirt followed by a list of category names that are marked either '1' or '0' depending on whether the t-shirt falls into that category. eg. TshirtID=1, Cat1 = 1, Cat2 = 0, Cat3 = 0, Cat4 = 1 etc.
There are 23 categories in all.
What I want to do is to take one tshirt and compare it to the next and get a score of how well its categories compare; add this score to an array. Then compare to the next shirt and add to the array. etc etc Then sort the array to get the top five most relavent tshirts. You all still awake?
I then want to move onto the next shirt in the db and do exactly the same. Until by the end I have all my shirts, each of them associated with their five most relevant shirts.
I guess my question is how the hell do I do this?
Sorry for the long question. Someone please help.