I have this problem and I haven't been able to figure out how can I make this work.
I have a table called "parents" and a table called "students"
Parents table has
id, name, lastname and type. "Type" cantains something like "mother" or "father".
Students table has
id, name, lastname, motherid(parents table), fatherid(parents table).
How can I make a query with JOINS that returns the Mother's name and the Father's name? And knowing that the parents can have multiple children, and obviously a student can have two parents, Mother and Father...
I hope I explained it well, thank you beforehand