I have users in my database with many stored points ie age, gender, interests etc. about 20 points in all.
I have a table of products that I want to recommend only applicable products. They each have saved like minage, maxage, gender, interest etc for the ideal consumer. ie dress gender=f
This is the bare bones of what I have so far:
$result = mysql_query("SELECT * FROM user_table WHERE hash='$session_id'");
$rowuser = mysql_fetch_array($result);
$result = mysql_query("SELECT * FROM products");
$rowproducts = mysql_fetch_array($result);
So now I have $rowuser['gender'] = m , how do I remove all from $rowproducts where gender = f?
Is there a best way to do this knowing I have about 20 points to go through before I am left with an array with just the best selection of products for this user in it?