01.
$strSQL2
=
"SELECT count(C_NCNo) as NCcount From eva5 where (C_NCCreateDate between '$start' and '$end') and C_DefectEmp='"
.
$_GET
[txtid].
"' "
;
02.
$objExec2
= odbc_exec(
$objConnect2
,
$strSQL2
)
or
die
(
"Error Execute ["
.
$strSQL2
.
"]"
);
03.
$objResult2
= odbc_fetch_array(
$objExec2
);
04.
05.
$strSQL
=
"SELECT DISTINCT process_precent_name From eva1 where (chkdate between $start and $end) and WipPro_PNOUT='"
.
$_GET
[txtid].
"'"
;
06.
$objExec
= odbc_exec(
$objConnect
,
$strSQL
)
or
die
(
"Error Execute ["
.
$strSQL
.
"]"
);
07.
while
(
$objResult
= odbc_fetch_array(
$objExec
))
08.
{
09.
$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].
"' )"
;
10.
$objExec3
= odbc_exec(
$objConnect
,
$strSQL3
)
or
die
(
"Error Execute ["
.
$strSQL3
.
"]"
);
11.
$objResult3
= odbc_fetch_array(
$objExec3
);
12.
13.
$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].
"' "
;
14.
$objExec11
= odbc_exec(
$objConnect
,
$strSQL11
)
or
die
(
"Error Execute ["
.
$strSQL11
.
"]"
);
15.
while
(
$objResult11
= odbc_fetch_array(
$objExec11
))
16.
{
17.
18.
}
19.
}