Answer the question
In order to leave comments, you need to log in
What is the php error?
Tell me what's wrong?
Piece of code:
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);
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question