Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public function postsList($route) {
- $max = 10;
- $params = [
- 'max' => $max,
- 'start' => ((($route['page'] ?? 1) - 1) * $max),
- ];
- return $this->db->row('SELECT * FROM posts ORDER BY id DESC LIMIT
- :start, :max', $params);
- }
Add Comment
Please, Sign In to add comment