Php MYSQL查询在我的web应用程序中返回不正确的结果
我想得到的人谁申请了特定的类别是积极的,但我不能得到正确的结果名单 下面是我尝试过的查询Php MYSQL查询在我的web应用程序中返回不正确的结果,php,mysql,Php,Mysql,我想得到的人谁申请了特定的类别是积极的,但我不能得到正确的结果名单 下面是我尝试过的查询 $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
$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")
问题发生在最后一种情况下,它会带来所有记录,这些记录都在候选项所选项类别表a中,并且具有活动值1,这一行末尾似乎缺少一些内容:
select s_p_I.name,p_s.Seatno,t_s
(在t\u s
之后应该有一个字段名)
在第二行中,您应该为从中选择的不同表使用联接。请不要使用
mysql\ucode>函数,因为它们都是函数。请学习使用代码格式。有关如何改进问题的指导,请参阅。