Please select the courses.
$res = sql_query("select r.idx,r.t_idx,a.*,b.mb_name_en from db_ttable as r
left join db_time as a on r.t_idx = a.idx
left join db_member as b on a.t_prof = b.mb_no where tt_view='1' group by t_idx order by a.idx asc");
for($i=0;$i<$row = sql_fetch_array($res);$i++){?>