consulta sin procesar de codeigniter
$sql="Select * from my_table where 1";
$query = $this->db->query($SQL);
return $query->result_array();
Poor Peacock
$sql="Select * from my_table where 1";
$query = $this->db->query($SQL);
return $query->result_array();
$query = $db->query('YOUR QUERY HERE');
$this->db->select('*');
$this->db->from('rankcertificate');
$this->db->where('cin', $user);
$this->db->where('year', '14/15');
$query = $this->db->get();