5. srv / bd / pasatiempoConsultaNoEliminados.php

1<?php
2
3require_once __DIR__ . "/../modelo/Pasatiempo.php";
4require_once __DIR__ . "/Bd.php";
5require_once __DIR__ . "/../../lib/php/recibeFetchAll.php";
6
7/** @return Pasatiempo[] */
8function pasatiempoConsultaNoEliminados()
9{
10 $con = Bd::getConexion();
11 $stmt = $con->query(
12 "SELECT
13 PAS_UUID AS uuid,
14 PAS_NOMBRE AS nombre,
15 PAS_MODIFICACION AS modificacion,
16 PAS_ELIMINADO AS eliminado
17 FROM PASATIEMPO
18 WHERE PAS_ELIMINADO = 0
19 ORDER BY PAS_NOMBRE"
20 );
21 $resultado = $stmt->fetchAll(
22 PDO::FETCH_CLASS | PDO::FETCH_PROPS_LATE,
23 Pasatiempo::class
24 );
25 return recibeFetchAll($resultado);
26}
27
skip_previous skip_next