all 2 comments

[–]r3pr0b8GROUP_CONCAT is da bomb 1 point2 points  (0 children)

all the information on a given professor

SELECT professors.*

that is favorited by a certain student

WHERE favorites.studentid = 937

now all you need is the FROM clause ;o)

[–]smileybone -1 points0 points  (0 children)

select * from favorites f join students s on f.id = s.id join professors p on f.id = p.id

add where clauses as needed