CodeIgniter Forums

Full Version: Active records join problem
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum


I tried:

            $this->db->join('gemeinde', 'tmp_query_vogelbeobachtungen.refto_gemeinde =', 'left');
            $myquery = $this->db->get()->result_array();

and got an error:

A PHP Error was encountered

Severity: Warning

Message: preg_match() expects parameter 2 to be string, array given

Filename: mysqli/mysqli_driver.php

Line Number: 184

How should I pass the parameter in the join-method?

Thanks Martin

El Forum


The join part looks good, but select a bit messy. According to the manual ( the select should only have maximum 2 parameters and you pass 3 to it.

Try it like this:
$this->db->select('tmp_query_vogelbeobachtungen.*,', FALSE);

El Forum

;-) Solved; problem was the to_excel helper that wants an object (db-query) not the result-array.