I want to retrieve first four rows, the second grooup of four rows and so on until the end of the MySQL table named Productos. If I make queries from PHPMyAdmin values are retrieved correctly. But when I try to retrieve them from PHP no values are retrieved.
The code:
$this -> minimo = $_GET["minimo"];
echo "</br>" . $this -> minimo;
$this -> qry = "SELECT nombre,descripcion,precio,foto FROM productos
LIMIT ?,4";
$this -> sqry = $this -> conexion -> prepare($this -> qry);
$this->sqry->bindParam(1,$this -> minimo,PDO::PARAM_INT);
$this -> sqry -> execute();
echo "</br>"; var_dump($this -> sqry);
$this -> resul = $this -> sqry -> fetchAll();
echo "Resul es " ; var_dump($this -> resul);
After running the script I watch the following:
0
object(PDOStatement)#4 (1) {
["queryString"]=> string(62) "SELECT nombre,descripcion,precio,foto FROM productos LIMIT ?,4" }
Resul es array(0) { }
How can I retrive values?
Thanks