<?php
class GGaleria{    

    public function lista(){
      return "SELECT id_galeria as id, no_titulo as noTitulo, no_descripcion as noDescripcion, no_ruta as noRuta, no_enlace as noEnlace, fe_inicio as feInicio, fe_fin as feFin  FROM tb_galeria where status='1'";
    }

    public function guardar(){
        return "INSERT INTO tb_galeria(no_titulo,no_descripcion,no_ruta,no_enlace,fe_inicio,fe_fin,id_galeria) VALUES (?,?,?,?,?,?,?)";
    }

    public function modificar(){
      return "UPDATE tb_galeria SET no_titulo = ?, no_descripcion = ?, no_ruta = ?, no_enlace = ?, fe_inicio = ?, fe_fin = ? WHERE id_galeria = ?";     
    }

    public function existeImagen(){
      return "SELECT COUNT(1) as cant FROM tb_galeria WHERE no_ruta = ? and status='1'";
    }

    public function eliminar(){
      return "UPDATE tb_galeria SET status = '0' WHERE id_galeria = ?";
    }

}
?>