mirror of
https://github.com/devcode-it/openstamanager.git
synced 2025-02-06 02:33:27 +01:00
Aggiunto calcolo automatico pages per API
This commit is contained in:
parent
bfd7e27556
commit
63e1909f8d
@ -146,7 +146,10 @@ class Manager
|
|||||||
$count = $database->fetchNum($query, $parameters);
|
$count = $database->fetchNum($query, $parameters);
|
||||||
|
|
||||||
$response['total-count'] = $count;
|
$response['total-count'] = $count;
|
||||||
$response['pages'] = intval(ceil($count / $length));
|
}
|
||||||
|
|
||||||
|
if (empty($response['pages'])) {
|
||||||
|
$response['pages'] = intval(ceil($response['total-count'] / $length));
|
||||||
}
|
}
|
||||||
} catch (PDOException $e) {
|
} catch (PDOException $e) {
|
||||||
// Log dell'errore
|
// Log dell'errore
|
||||||
|
Loading…
x
Reference in New Issue
Block a user