<?php
$strSQL = "SELECT COUNT( * )
FROM `tbl_computer_help`
WHERE `Display` LIKE 'หน้าจอ' and (`Date_time` > '$li_month' and `Date_time` < '$li_month2' or `Date_time` LIKE '$li_month2%')";
$objQuery = mysql_query($strSQL) or die ("Error Query [".$strSQL."]");
$objResult = mysql_fetch_array($objQuery);
<?
$strSQL = "SELECT COUNT( * )
FROM `tbl_computer_help`
WHERE `Mouse` LIKE 'เมาส์' and (`Date_time` > '$li_month' and `Date_time` < '$li_month2' or `Date_time` LIKE '$li_month2%')";
$objQuery = mysql_query($strSQL) or die ("Error Query [".$strSQL."]");
$objResult = mysql_fetch_array($objQuery);
?><?=$objResult["0"];?>
</td>
</tr>
<tr>
<td>3. คียบอร์ด</td>
<td>
<?
$strSQL = "SELECT COUNT( * )
FROM `tbl_computer_help`
WHERE `Keyboard` LIKE 'คีย์บอร์ด' and (`Date_time` > '$li_month' and `Date_time` < '$li_month2' or `Date_time` LIKE '$li_month2%')";
$objQuery = mysql_query($strSQL) or die ("Error Query [".$strSQL."]");
$objResult = mysql_fetch_array($objQuery);
?><?=$objResult["0"];?>
</td>
</tr>
<tr>
<td>4. สาย LAN</td>
<td>
<?
$strSQL = "SELECT COUNT( * )
FROM `tbl_computer_help`
WHERE `Lan` LIKE 'สาย LAN' and (`Date_time` > '$li_month' and `Date_time` < '$li_month2' or `Date_time` LIKE '$li_month2%')";
$objQuery = mysql_query($strSQL) or die ("Error Query [".$strSQL."]");
$objResult = mysql_fetch_array($objQuery);
?><?=$objResult["0"];?>
</td>
</tr>
<tr>
<td>5. Post_USB</td>
<td>
<?
$strSQL = "SELECT COUNT( * )
FROM `tbl_computer_help`
WHERE `PortUSB` LIKE 'Port_USB' and (`Date_time` > '$li_month' and `Date_time` < '$li_month2' or `Date_time` LIKE '$li_month2%')";
$objQuery = mysql_query($strSQL) or die ("Error Query [".$strSQL."]");
$objResult = mysql_fetch_array($objQuery);
?><?=$objResult["0"];?>
</td>
</tr>
<tr>
<td>6. CD-Rom</td>
<td>
<?
$strSQL = "SELECT COUNT( * )
FROM `tbl_computer_help`
WHERE `CDrom` LIKE 'CD-ROM' and (`Date_time` > '$li_month' and `Date_time` < '$li_month2' or `Date_time` LIKE '$li_month2%')";
$objQuery = mysql_query($strSQL) or die ("Error Query [".$strSQL."]");
$objResult = mysql_fetch_array($objQuery);
?><?=$objResult["0"];?>
</td>
</tr>
<tr>
<td>7. CPU</td>
<td>
<?
$strSQL = "SELECT COUNT( * )
FROM `tbl_computer_help`
WHERE `CPU` LIKE 'CPU' and (`Date_time` > '$li_month' and `Date_time` < '$li_month2' or `Date_time` LIKE '$li_month2%')";
$objQuery = mysql_query($strSQL) or die ("Error Query [".$strSQL."]");
$objResult = mysql_fetch_array($objQuery);
?><?=$objResult["0"];?>
</td>
</tr>
<tr>
<td>8. อื่น ๆ</td>
<td>
<?
$strSQL = "SELECT COUNT( * )
FROM `tbl_computer_help`
WHERE `Other` LIKE 'อื่น ๆ' and (`Date_time` > '$li_month' and `Date_time` < '$li_month2' or `Date_time` LIKE '$li_month2%')";
$objQuery = mysql_query($strSQL) or die ("Error Query [".$strSQL."]");
$objResult = mysql_fetch_array($objQuery);
?><?=$objResult["0"];?>