sql_connect(); $month[0]='January'; $month[1]='February'; $month[2]='March'; $month[3]='April'; $month[4]='May'; $month[5]='June'; $month[6]='July'; $month[7]='August'; $month[8]='September'; $month[9]='October'; $month[10]='November'; $month[11]='December' ; $month_n[0]=' 1'; $month_n[1]=' 2'; $month_n[2]=' 3'; $month_n[3]=' 4'; $month_n[4]=' 5'; $month_n[5]=' 6'; $month_n[6]=' 7'; $month_n[7]=' 8'; $month_n[8]=' 9'; $month_n[9]='10'; $month_n[10]='11'; $month_n[11]='12'; ?> sql_query=$quer_need; $my->sql_execute(); if($my->sql_err) echo "epic fail"; $zz=0; while(list($name)=mysql_fetch_row($my->sql_res)) { $name_list[$zz]=$name; $zz=$zz+1; } for ($ii=0;$ii"; echo ""; echo ""; echo ""; echo ""; } ?>
"; $quer_need_p="select position from pos".strval($name_list[$ii]).";"; $my->sql_query=$quer_need_p; $my->sql_execute(); echo "SN".strval($name_list[$ii]); echo ""; echo "Data download"; echo ""; echo "data is available: "; $in_time_data_quer="select MONTH, DAY, YEAR from ".strval(4-$ii)."data_m_2 where t_id=1;"; $my->sql_query=$in_time_data_quer; $my->sql_execute(); if($my->sql_err) echo "epic fail"; $in_time=''; while ($row=mysql_fetch_array($my->sql_res)) { echo $row[1].".".$row[0].".".$row[2]; } echo "-"; $max_t_id_quer="select max(t_id) from ".strval(4-$ii)."data_m_2 ;"; $my->sql_query=$max_t_id_quer; $my->sql_execute(); if($my->sql_err) echo "epic fail"; $need_id=0; while (list($name)=mysql_fetch_row($my->sql_res)) { $need_id=$name; } $in_time_data_quer="select MONTH, DAY, YEAR from ".strval(4-$ii)."data_m_2 where t_id=".$need_id.";"; $my->sql_query=$in_time_data_quer; $my->sql_execute(); if($my->sql_err) echo "epic fail"; $in_time=''; while ($row=mysql_fetch_array($my->sql_res)) { echo $row[1].".".$row[0].".".$row[2]." "; } echo "