Model
public function get_all($limit = NULL, $offset = NULL)
{
$this->db->select('cli_id, cli_nome');
$this->db->from("cliente");
$query = $this->db->get();
$data = $query->result();
return $data;
}
$results = $this->Cliente_model->get_all_where($limit, $offset);
foreach ($results as $row) { echo $row->cli_nome; }
public function get_all($limit = NULL, $offset = NULL)
{
$this->db->select('cli_id, cli_nome');
$this->db->from("cliente");
$query = $this->db->get();
$data = $query->result();
return $data;
}
$results = $this->Cliente_model->get_all_where($limit, $offset);
foreach ($results as $row) {
echo $row->cli_nome;
}