[eluser]Fabdrol[/eluser]
Guess I found the problem: somehow the code composes a Query out of two different querys..
this is the case:
Code:
function a($ex) {
foreach($ex as $e) {
// $ex = array('perma1', 'perma2', 'perma3');
$uid = $this->b($e);
if($uid != false) {
$this->db->where('group !=', $uid);
}
}
// do some more stuff based on the generated where clauses.
}
function b($p) {
$this->db->select('uid');
$this->db->where('perma', $p);
// do db stuff
return $uid // from db
}
In this example the code generates a combined query out of function a & b, like this:
SELECT uid FROM groups WHERE perma = 'perma1' AND group != 'fjdka89343kasd23234dahth';
That's not good.. is it a bug? oh, and I get the following error now:
Code:
A Database Error Occurred
Error Number: 1054
Unknown column 'group' in 'where clause'
SELECT `uid` FROM (`groups`) WHERE `group` != '3aed4079ce471782187e3baea9708327' AND `perma` = 'mr'
In the error, you see the "`group` != '3aed4079ce471782187e3baea9708327'" part. that shouldn't be in that query, but in anothr query.. is it a CI bug? or did I do something stupid?