hi cosminb
actually we are using three tables using left join
following the query which was we are using
so what is wrong on this query
$qry0="select if(c.reg_no!=\"\",c.reg_no, c.fil_no) as filno, if(c.reg_no!=\"\"
,'R','S') as flag, substring(if(c.reg_no!=\"\", c.reg_no, c.fil_no),6,5) as case
no, substring(if(c.reg_no!=\"\", c.reg_no,c.fil_no),11,4) as caseyr, purpose, ne
xt_dt,lst_case,lst_conn,lst_appl, b.srno from main as c, heardt as a left join p
riority as b on a.purpose=b.stage where a.fil_no=c.fil_no and a.next_dt='$m_curd
ate' and a.jud1=$m_jud1 and a.jud2=$m_jud2 and a.jud3=$m_jud3 and b.jud1=$m_jud
1 and b.jud2=$m_jud2 and b.jud3=$m_jud3 and side='$m_sideflg' and b.brdstat='A'
order by b.srno, caseyr, caseno "
please tell or send any information about same one.