$stat = "N"; } else { if ($assStat == "3") { $stat = "D"; } else { $stat = ""; } } } } $page = $_GET['selectedPage']; $iPage = 20; if ($page > 0) { $startPage = $page * $iPage; $endPage = 20; $arrL = $checkAsset->getCheckAssetByStatusLim($stat, $startPage, $endPage); $arrA = $checkAsset->getCheckAssetByStatus($stat); $cmd = $arrL; $cmdA = $arrA; } else { $startPage = 0; $endPage = 20; $arrL = $checkAsset->getCheckAssetByStatusLim($stat, $startPage, $endPage); $arrA = $checkAsset->getCheckAsset(); $cmd = $arrL; $cmdA = $arrA; } $num = $db->num_rows($cmdA); $numPage = round($num / 20); echo "จำนวนหน้าทั้งหมด : "; $i = 0;