Hello. I have a three table setup in my database: members, clases, classregistration.
The class registration table has m_id and c_id columns that store the member id and class id. For example if the same member registers with more classes it will be rows of same m_id with different c_id.
I am trying to view all members that are with a particular class and I have this query but it doesn’t return anything.
SELECT classregistration.c_id, members.member_first_name FROM classregistration INNER JOIN clases ON clases.class_id = classregistration.c_id WHERE clases.class_id = 2
What I am doing wrong?