Im having problems building 1 more step into this query
This select's user information from my user table shocc_users
where it finds a user online in my active table , shocc_active
But id also like to select the user's photo file_name from shocc_account_photos where it's their main pic , which is set as "1"
shocc_account_photos Layout
username
photo_filename
main
Im trying to get the photo filename from shocc_account_photos where main = 1 and join that with this
$sql = "SELECT shocc_users.city, shocc_users.state, shocc_users.username,
shocc_users.rating,shocc_users.ethnicity,shocc_users.starsign
FROM shocc_users
INNER JOIN shocc_active
ON shocc_users.username = shocc_active.username
";
Im not having good luck , i tried a query with the code i had coded and it returned TONS of information over and over and over
Could someone help me?