<?php
class Datosclien_model extends CI_model{
	public $idcliente;
	public $edad;
	public $area;
	public $saldo;
	public function __construct(){
		$this->load->database();
	}
	public function find($idcliente){
		return $this->db->get_where('datosclien', ['idcliente' => $idcliente])->result_array();
	}
	public function byEdad($edad){
		$data = [];
		$this->db->select('idcliente');
		$this->db->from('datosclien');
		$this->db->where('edad >=', $edad);
		foreach($this->db->get()->result_array() as $cliente){
			array_push($data, $cliente['idcliente']);
		}
		return $data;
	}
}
{'avg_line_length': 25.217391304347824, 'max_line_length': 89, 'alphanum_fraction': 0.653448275862069, 'licenses': ['MIT'], 'repository_name': 'alka653/CellvozChallenge', 'path': 'application/models/Datosclien_model.php', 'size': 580, 'lang': 'PHP'}