-
-
Save parzibyte/ea4fb11a7397a16a82ea094592b286c4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$consulta = "select codigo, descripcion, precioCompra, precioVenta, existencia from productos"; | |
$sentencia = $bd->prepare($consulta, [ | |
PDO::ATTR_CURSOR => PDO::CURSOR_SCROLL, | |
]); | |
$sentencia->execute(); | |
# Comenzamos en la 2 porque la 1 es del encabezado | |
$numeroDeFila = 2; | |
while ($producto = $sentencia->fetchObject()) { | |
# Trabajar con $producto aquí :^) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment