Hi all
$mysql_report="Select i_no,mg.m_d_c,m_d_name,mg.s_no,i_c_no,m_date,m_du_date from t_m_i_list mg,t_m_d d,t_m_g_i mi where mg.f_id='$lv_p_f_id' and mg.m_d_c='$m_p_d_c' and mg.M_D_C=d.M_D_C and mi.M_G_C=mg.i_no";
$mysql_report.=" union ";
$mysql_report.="select g_id,mh.m_d_c,m_d_n,mh.s_no,g_c_no,m_date,m_du_date from t_m_g_list mh,t_m_d d,t_m_g_i mi where mh.f_id='$lv_p_f_id' and mh.m_d_code='$m_p_d_c' and mi.M_G_C=mh.G_ID and mh.M_D_C=d.M_D_C order by m_du_date desc";
I have above query which returns around 43 rows resultset i take only these 3 fields from the above query returned resultset
$lv_g_c = $rec_report->fields[4];
$lv_l_cali=$rec_report->fields[5];
$lv_du_date =$rec_report->fields[6];
I get multiple results of same $lv_g_c,$lv_l_cali and $lv_du_date from the above query but i want only the latest du_date records only thats why i started this query with du_date desc i have to display only .
now what is happening is records are printing latest du date and old du date also. How can i filter
Thanks in advance