-1
我想的谁已经申请了特定类别是活跃的人名单,但我不能得到正确的结果MySQL查询返回我的Web应用程序不正确的结果
下面是我查询我试图
$Query = mysql_query("select s_p_I.name,p_s.Seatno,t_s
from student_pers_info s_p_I, pat_students p_s,test_score t_s,current_category c_c,candidate_selected_category c_s_c
where (s_p_I.pat_code=p_s.pat_code)
&& (s_p_i.pat_code =t_s.pat_code)
&& (c_c.category_code =c_s_c.category_code)
&& (c_c.active = c_s_c.active) = 1")
问题发生在最后一个条件带来的所有记录谁都是在candidate_selected_category表和具有活性值1
选择请不要在不同的表'使用'mysql_'函数,因为它们都是[弃用和安全风险](http://stackoverflow.com/questions/12859942/why-shouldnt-i-use-mysql-functions-in-php) – roberto06
请学习使用代码格式。 – CGritton
请参阅http://meta.stackoverflow.com/questions/333952/why-should-i-provide-an-mcve-for-what-seems-to-me-to-be-a-very-simple-sql-查询如何改善您的问题的指导。 – Shadow