fixed pagination

This commit is contained in:
Frank Schubert
2021-12-21 22:40:28 +01:00
parent f00100c4df
commit 9413110d5c
3 changed files with 5 additions and 6 deletions

View File

@@ -31,12 +31,12 @@
</div>
<div class="col-1">
<label class="form-label" for="filter_countrycode">Countrycode</label>
<label class="form-label" for="filter_countrycode">Landeskennzahl</label>
<input type="text" class="form-control" name="filter[countrycode]" id="filter_countrycode" value="<?=$filter['countrycode']?>" />
</div>
<div class="col-1">
<label class="form-label" for="filter_areacode">Areacode</label>
<label class="form-label" for="filter_areacode">Ortskennzahl</label>
<input type="text" class="form-control" name="filter[areacode]" id="filter_areacode" value="<?=$filter['areacode']?>" />
</div>

View File

@@ -41,7 +41,6 @@ class VoicenumberblockController extends mfBaseController {
$pagination['maxItems'] = VoicenumberblockModel::count($filter);
$blocks = VoicenumberblockModel::search($filter, $pagination);
$this->layout()->set("blocks", $blocks);
$this->layout()->set("pagination", $pagination);

View File

@@ -94,8 +94,6 @@ class VoicenumberblockModel {
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'])) {
$sql .= " LIMIT ".$limit['start'].", ".$limit['count'];
@@ -104,7 +102,9 @@ class VoicenumberblockModel {
}
}
mfLoghandler::singleton()->debug($sql);
$res = $db->query($sql);
//mfLoghandler::singleton()->debug($sql);
if($db->num_rows($res)) {
while($data = $db->fetch_object($res)) {