我的查询有什么问题?
select p.name, p.photo, (
SELECT AVG(count(ra.id_prof)/sum(ra.rate))
FROM rating ra
WHERE ra.id_prof = p.id) as rating
from prof_table p, matier_prof mp, matiere m, niveau ni
where p.id=mp.id_prof and mp.id_matiere=m.id_mat and m.id_niv=ni.id_niv
having p.name like '%word%' or p.email like '%word%' or p.adresse like '%word%' or
p.biographie like '%word%' or m.matiere like '%word%' or ni.niveau like '%word%'
1条答案
按热度按时间1l5u6lss1#
我已经在你的请求的评论部分提到了你的问题。这可能就是你想要的:从prof\ u表中选择,在prof\ u表中,单词可以在其中一列中找到,或者匹配的matiere或niveau存在。