Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created June 24, 2020 04:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save parzibyte/7c702996da2170ccace5bc0ffaa42d3a to your computer and use it in GitHub Desktop.
Save parzibyte/7c702996da2170ccace5bc0ffaa42d3a to your computer and use it in GitHub Desktop.
<?php
# Ahora obtenemos los productos usando ya el OFFSET y el LIMIT
$sentencia = $base_de_datos->prepare("SELECT * FROM productos LIMIT ? OFFSET ?");
$sentencia->execute([$limit, $offset]);
$productos = $sentencia->fetchAll(PDO::FETCH_OBJ);
# Y más abajo los dibujamos...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment