Welcome Guest, Not a member yet? Register   Sign In
Data problem
#1

[eluser]Unknown[/eluser]
please i need help with this code the controller sends a parameter to my model, but the latter does not.if I give the parameter value if it works. could show me the error, and I give him two weeks back and nothing.

class Cliente_Model extends CI_Model{

//Public var $id1 = "";

function __construct(){
// Call the Model constructor
parent::__construct();
}

Public function search1($id){
echo ($id);
$this->db->select('intClienteId , varRazonSocial, varLogoCliente, varDireccion, varTelefono1Cliente, varCorreo1Cliente, varURL1Cliente');
//$this->db->where('varTipo1ClienteId',$id);
$this->db->where('varTipo1ClienteId',26);
$query = $this->db->get('tb_cliente');
//foreach ($query->result() as $row){ echo $row->varRazonSocial;}
if ($query -> num_rows>0){
return $query;
}else {
return FALSE;
}

}


}
#2

[eluser]InsiteFX[/eluser]
CodeIgniter User Guide - Generating Query Results

Code:
// return an object.
return $query->row();
return $query->result();

// return an array
return $query->result_array();
return $query->row_array();




Theme © iAndrew 2016 - Forum software by © MyBB