Fixed pagination

This commit is contained in:
Frank Schubert
2021-12-21 22:33:42 +01:00
parent 8e4d0c6fe8
commit f00100c4df

View File

@@ -90,9 +90,11 @@ class VoicenumberblockModel {
$db = FronkDB::singleton();
$where = self::getSqlFilter($filter);
mfLoghandler::singleton()->debug($where);
//mfLoghandler::singleton()->log->debug($where);
$res = $db->select("Voicenumberblock", "*", "$where ORDER BY countrycode, areacode, first, last");
$sql = "SELECT * FROM Voicenumberblock
WHERE $where
ORDER BY countrycode, areacode, first, last";
$res = $db->query($sql);
if(is_array($limit) && count($limit)) {
if(is_numeric($limit['start']) && is_numeric($limit['count'])) {
@@ -102,6 +104,8 @@ class VoicenumberblockModel {
}
}
mfLoghandler::singleton()->debug($sql);
if($db->num_rows($res)) {
while($data = $db->fetch_object($res)) {
$items[] = new Voicenumberblock($data);