I made a SQL to filter results according to the desired parameters that resulted in the following statement:
$query = $pdo->query("SELECT * FROM imovel ".trim($where, ' AND '));
Since I used PDO to mount the $query
do I have to do the result pagination in PDO
or can I do it in MySQL
?
Example of $query
result:
SELECT * FROM imovel WHERE 1=1 AND CATEGORIA IN ('CASA') AND DORMITORIO IN (2)
I also have to execute pagination, the number of pages: