Following on from MySQL multiple Id lookups
So I’m looking at other ways around the fulltextsearch limitation on views.
I updated the provided query…
SELECT t.teacherId, s1.subjectName AS name1, s2.subjectName AS name2, s3.subjectName AS name3
FROM teacherProfile t
LEFT JOIN
subjects s1
ON s1.subjectId = t.subjectOne
LEFT JOIN
subjects s2
ON s2.subjectId = t.subjectTwo
LEFT JOIN
subjects s3
ON s3.subjectId = t.subjectThree
Which works a treat at least, but if I add..
WHERE name1 = ENGLISH'
to the end I get Unknown column name1, can I not even do a simple query on the data?
, or, referring to your original problem,
(works only if both tables are
MyISAM)This will return all teachers who teach both
EnglishandPhysics.