I make the following query:
$this->db->distinct();
$this->db->select('documentos.titulo_principal,documentos.descripcion,autores.nombre,areas.nombre');
$this->db->from('documentos');
$this->db->join('documento_area', 'documentos.id_documento = documento_area.id_documento');
$this->db->join('areas', 'areas.id_area = documento_area.id_area');
$this->db->join('documento_autor', 'documentos.id_documento = documento_autor.id_documento');
$this->db->join('autores', 'autores.id_autor = documento_autor.id_autor');
$this->db->join('documento_palabra', 'documentos.id_documento = documento_palabra.id_documento');
$this->db->join('palabraclave', 'palabraclave.id_palabra = documento_palabra.id_palabra');
$query = $this->db->get();
When visualizing its result is: stdClass Object ([main_title] => java bible [description] = & sdfdsfsdf [name] = > mathematics).
But when I do the direct query from sql, it brings me this data:
Someone knows how I can bring the result "JON" from the field "name". That result belongs to a table called "authors".