-
-
Save parzibyte/efb254d6186cfd258737b3f5b6616ff8 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 | |
function obtenerIdsDeProductosEnCarrito() | |
{ | |
$bd = obtenerConexion(); | |
iniciarSesionSiNoEstaIniciada(); | |
$sentencia = $bd->prepare("SELECT id_producto FROM carrito_usuarios WHERE id_sesion = ?"); | |
$idSesion = session_id(); | |
$sentencia->execute([$idSesion]); | |
return $sentencia->fetchAll(PDO::FETCH_COLUMN); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment