I have two tables: favorites and users. Favorites table has 3 field, id, member, fav. Users table has quite a few fields but the ones I'm working with are: username and gender.
How can I get data from both tables to separate the favorites of the user by gender?
Ex:
Favorites table:
id: 1
member: testing123 // the user who has a favorites list
fav: testing456 //member on user's favorite list
Users table:
username: testing456
gender: male
The favorites list contains more than one entry which is why I used a loop but it doesn't seem to work.
I tried using 2 loops but php just spits out a mysql_fetch_array error, or doesn't loop it.