Hi all
For the following query i get two records displayed but i am getting only one record. please help me how to modify my query to get two records displayed
$regdate1=$_POST['txtregdate1'];
$regdate2=$_POST['txtregdate2'];
$sel_query="select pid from Sinfo as sb where registration_date >= '$regdate1' or registration_date <= '$regdate2'";
$res=mysql_query($sel_query);
while($row=mysql_fetch_array($res))
{
$tpid=$row['pid'];
if($tpid==1)
{
$actable='d_a_info';
$fintable='d_f_info';
}
elseif($tpid==2)
{
$actable='o_a_info';
$fintable='o_f_info';
}
elseif($tpid==3)
{
$actable='s_a_info';
$fintable='s_f_info';
}
}
$sel_query = "select id_number,last_name,first_name,programme_name,student_status_name,amount_paid,amount_due from sinfo as sb, st_table as st,programmes as p,student_status as sst,$actable as dai,$fintable as dif where p.pid=sb.pid and dai.id=st.a_info_id and dif.id=st.f_info_id and sb.student_status_id=sst.student_status_id and st.student_basic_info_id=sb.id";