function searchMachineriesDepreciation($searchKey, $page = 0) { if ($page > 0) { $page = ($page - 1) * PAGE_BY; $limit = "LIMIT {$page}," . PAGE_BY; } $fields = array("code", "description", "status", "value"); $machineriesDepreciationRecords = new MachineriesDepreciationRecords(); if ($machineriesDepreciationRecords->searchRecords($searchKey, $fields, $limit)) { if (!($domDoc = $machineriesDepreciationRecords->getDomDocument())) { return false; } else { $xmlStr = $domDoc->dump_mem(true); return $xmlStr; } } else { return false; } }