Code:
echo '
<table id="kanban_list">
<thead>
<tr>
<td>
<label>Display Details:</label>
<input
onclick="showDetails(this);"
id="chkDetail"
type="checkbox"
checked="checked"
value="wip"
/>
</td>
<th scope="col">PCODE</th>
<th scope="col">LOT CODE</th>
<th scope="col">CHEMICAL WEIGHING</th>
<th scope="col">COMPOUNDING</th>
<th scope="col">EXTRUSION</th>
<th scope="col">FORMING</th>
<th scope="col">DEFLASHING</th>
<th scope="col">KANBAN</th>
<th scope="col">VIRTUAL</th>
<th scope="col">TOTAL</th>
<!--<th scope="col">MIN LOT</th>-->
</tr>
</thead><tbody>';
$sql="SELECT DISTINCT kd.PCODE, kc.count_wip_chemical_weighing, kc.count_wip_compounding, kc.count_wip_extrusion, kc.count_wip_forming, kc.count_wip_deflashing, kc.kanban, kc.virtual, kc.total FROM kanban_checker kc JOIN kanban_data kd ON kc.PCODE=kd.PCODE
ORDER BY kc.PCODE";
$result=mysql_query($sql, $con);
$counter=0;
while ($row=mysql_fetch_assoc($result)){
echo '
<tr',(++$counter%2==0 ? '' : ' class="even"'),'>
<th scope="row">Total Lot ID (Lot)</th>
<td>',$row[PCODE],'</td>
<td></td>
<td>',$row[count_wip_chemical_weighing],'</td>
<td>',$row[count_wip_compounding],'</td>
<td>',$row[count_wip_extrusion],'</td>
<td>',$row[count_wip_forming],'</td>
<td>',$row[count_wip_deflashing],'</td>
<td>',$row[kanban],'</td>
<td>',$row[virtual],'</td>
<td>',$row[total],'</td>
<!-- <td>',$row[min_lot],'</td> -->
</tr>';
}
$sql="SELECT DISTINCT kd.PCODE, kdc.count_doz_chemical_weighing, kdc.count_doz_compounding, kdc.count_doz_extrusion, kdc.count_doz_forming, kdc.count_doz_deflashing, kdc.kanban_doz, kdc.virtual_doz, kdc.total_doz FROM kanban_checker_doz kdc JOIN kanban_data kd ON kdc.PCODE=kd.PCODE
WHERE kd.PCODE='$row[PCODE]'
ORDER BY kdc.PCODE";
$result_qty=mysql_query($sql, $con);
while ($row_doz=mysql_fetch_assoc($result_qty)){
echo '
<tr',(++$counter%2==0 ? '' : ' class="even"'),'>
<th scope="row">Total Qty (Doz)</th>
<td>',$row_doz[PCODE],'</td>
<td></td>
<td>',$row_doz[count_doz_chemical_weighing],'</td>
<td>',$row_doz[count_doz_compounding],'</td>
<td>',$row_doz[count_doz_extrusion],'</td>
<td>',$row_doz[count_doz_forming],'</td>
<td>',$row_doz[count_doz_deflashing],'</td>
<td>',$row_doz[kanban_doz],'</td>
<td>',$row_doz[virtual_doz],'</td>
<td>',$row_doz[total_doz],'</td>
<!-- <td>',$row[min_lot],'</td> -->
</tr>';
}
echo '
</tbody>
</table>';
I also changed the first column in THEAD to a td -- that doesn't feel like a heading for that column.
Bookmarks