<?php
class Atencion_model extends CI_Model
{
    public function __construct()
    {
        parent::__construct();
        $this->load->database();
        $this->load->model('Atencion_model');
        $this->load->helper('correo');
    }

    public function obtenerDatos()
    {
        $fechai = $this->uri->segment(3);
        $fechaf = $this->uri->segment(4);
        $where = "fecha >= '" . $fechai . " 00:00:00' AND fecha <= '" . $fechaf . " 23:59:59'";
        $query = $this->db->select("*");
        $query = $this->db->from('view_reporte_diario');
        $this->db->where($where);
        $query = $this->db->get();
        return $query->result();
    }
}
