Ok, I have a book called SQL Queries for Mere Mortals. I have read the book and I thought I knew what I was doing, but obviously not LOL.
I am using MySQL with PHP. I have a database full of profiles and we wnat to be able to look profiles up by age group. Simple I thought, but as we all know nothing is simple when it comes to SQL.
This is what I want-
All Members that are between Xage and Yage. The tables are set up where the Profile ID and the Bio ID are the same. BUT the actual name is in the BIO table. I need it to filter the members in the profile table according to the age group and then select the Name from the BIO table. I thought this would be simple, but it is not.
Here is what I have-
$Query1 = "SELECT profile.age, profile.profile_id, bio.bio_id, bio.cname WHERE profile.age BETWEEN 13 AND 17 AND profile.profile_id = bio.bio_id";
And after the Query, it is supposed to display a table with just the Users Name (bio.cname)with a link that passes the bio.bio_id in the link so the template knows what profile to display.
Any Suggestions?
PS- I moved this from the database discussion