$strSQL2 = "SELECT count(C_NCNo) as NCcount From eva5 where (C_NCCreateDate between '$start' and '$end') and C_DefectEmp='".$_GET[txtid]."' ";
$objExec2 = odbc_exec($objConnect2, $strSQL2) or die ("Error Execute [".$strSQL2."]");
$objResult2 = odbc_fetch_array($objExec2);
$strSQL = "SELECT DISTINCT process_precent_name From eva1 where (chkdate between $start and $end) and WipPro_PNOUT='".$_GET[txtid]."'";
$objExec = odbc_exec($objConnect, $strSQL) or die ("Error Execute [".$strSQL."]");
while($objResult = odbc_fetch_array($objExec))
{
$strSQL3 = "SELECT SUM(sqm) as sqmss,(SELECT SUM(sqm) From eva1 where (chkdate between $start and $end) and (JN_PPn like '_P%' or JN_PPn like '_D%') and WipPro_PNOUT='".$_GET[txtid]."' and (process_precent_name='".$objResult[process_precent_name]."' ))as sqmds,(SELECT SUM(sqm) as sqmmu From eva1 where (chkdate between $start and $end) and (JN_PPn like '_M%') and WipPro_PNOUT='".$_GET[txtid]."' and (process_precent_name='".$objResult[process_precent_name]."' )) as sqmmu,(SELECT sum(PanelQtyOUT) From eva1 where (chkdate between $start and $end) and WipPro_PNOUT='".$_GET[txtid]."' and process_precent_name='".$objResult[process_precent_name]."') as panel From eva1 where (chkdate between $start and $end) and (JN_PPn like '_S%' or JN_PPn like '_C%') and WipPro_PNOUT='".$_GET[txtid]."' and (process_precent_name='".$objResult[process_precent_name]."' )";
$objExec3 = odbc_exec($objConnect, $strSQL3) or die ("Error Execute [".$strSQL3."]");
$objResult3 = odbc_fetch_array($objExec3);
$strSQL11 = "SELECT WipPro_SetUpTime,WipPro_QtyOUT,WipPro_CycleTime,WipPro_TimeIN,WipPro_TimeOUT From eva1 where (chkdate between $start and $end) and WipPro_PNOUT='".$_GET[txtid]."' and process_precent_name='".$objResult[process_precent_name]."' ";
$objExec11 = odbc_exec($objConnect, $strSQL11) or die ("Error Execute [".$strSQL11."]");
while( $objResult11 = odbc_fetch_array($objExec11))
{
}
}