01.
function
viewTable(
$db
){
02.
$this
->AddFont(
"THSarabunNew"
,
""
,
"THSarabunNew.php"
);
03.
$this
->SetFont(
"THSarabunNew_B"
,
""
,10);
04.
$stmt
=
$db
->query(
'select * from employee where work = "หัวหน้าส่วน" or work = "สารบรรณ" or work = "ขนส่งทั่วไป" and position <> "ลูกจ้างเหมา"'
);
05.
$stmt2
=
$db
->query(
'select * from employee where work = "ขนส่งวัสดุครุภัณฑ์" or position = "ลูกจ้างเหมา" or work = "-"'
);
06.
while
(
$data
=
$stmt
->fetch(PDO::FETCH_OBJ)
and
$data2
=
$stmt2
->fetch(PDO::FETCH_OBJ)){
07.
08.
$this
->Cell(14,5.1,iconv(
'UTF-8'
,
'TIS-620'
,
$data
->number),1,0,C);
09.
$this
->Cell(19,5.1,iconv(
'UTF-8'
,
'TIS-620'
,
$data
->first_name),LB,0,C);
10.
$this
->Cell(19,5.1,iconv(
'UTF-8'
,
'TIS-620'
,
$data
->last_name),RB,0,C);
11.
$this
->Cell(13,5.1,iconv(
'UTF-8'
,
'TIS-620'
,
$data
->position),1,0,C);
12.
$this
->Cell(15,5.1,iconv(
'UTF-8'
,
'TIS-620'
,
''
),1,0,C);
13.
$this
->Cell(15,5.1,iconv(
'UTF-8'
,
'TIS-620'
,
$data
->job),1,0,C);
14.
15.
$this
->Cell(14,5.1,iconv(
'UTF-8'
,
'TIS-620'
,
$data2
->number),1,0,C);
16.
$this
->Cell(19,5.1,iconv(
'UTF-8'
,
'TIS-620'
,
$data2
->first_name),LB,0,C);
17.
$this
->Cell(19,5.1,iconv(
'UTF-8'
,
'TIS-620'
,
$data2
->last_name),RB,0,C);
18.
$this
->Cell(13,5.1,iconv(
'UTF-8'
,
'TIS-620'
,
$data2
->position),1,0,C);
19.
$this
->Cell(15,5.1,iconv(
'UTF-8'
,
'TIS-620'
,
''
),1,0,C);
20.
$this
->Cell(15,5.1,iconv(
'UTF-8'
,
'TIS-620'
,
$data2
->job),1,1,C);
21.
22.
23.
24.
25.
}
26.
27.
}