<?php

class Home_model extends CI_Model
{

    public function __construct()
    {
        // Call the CI_Model constructor
        parent::__construct();
        $this->load->library('encryption');
    }

    public function get_last_ten_entries()
    {
        $query = $this->db->get('users', 10);
        return $query->result();
    }

    public function getCompanies_list_lat_lang($city)
    {
        $query = $this->db->select('*')->from('users')->where('city',$city)->get();
    return $query->result_array();
    }

    public function getCompanies_listByName($name)
    {
         $this->db->select('*');
         $this->db->from('users');
         $this->db->like('fname',$name);
         $this->db->where('role_id','3');
        return $this->db->get()->result_array();
    }
  
}