Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created June 5, 2019 18:00
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save parzibyte/c61a2b57e8835bcc3c8c697b4e2a5071 to your computer and use it in GitHub Desktop.
<?php
/*
CRUD con SQL Server y PHP
@author parzibyte [parzibyte.me/blog]
@date 2019-06-03
================================
Este archivo lista todos los
datos de la tabla, obteniendo a
los mismos como un arreglo
================================
*/
?>
<?php
include_once "base_de_datos.php";
$sentencia = $base_de_datos->query("select id, nombre, edad from mascotas");
$mascotas = $sentencia->fetchAll(PDO::FETCH_OBJ);
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment