0
I made an SQL to filter results according to the desired parameters which resulted in the following statement:
$query = $pdo->query("SELECT * FROM imovel ".trim($where, ' AND '));
Whereas I used PDO to mount the $query
I have to paginate results in PDO
or I can do it in MySQL
?
Example of the result of $query
:
SELECT * FROM imovel WHERE 1=1 AND CATEGORIA IN ('CASA') AND DORMITORIO IN (2)
I also have to execute the pagination, the number of the pages:
I recommend not mounting the querys the way you are doing. Search for Preparedstatements. As for the payment, I did not understand very well your question. What exactly you have tried?
– jlHertel
To make a pagination, use the Mysql LIMIT option, it has two arguments. Do a search...
– KaduAmaral