0
I’m pulling some data from Mongodb with Codeigniter and came across something strange... Some records are found and others are not. Debugging the code I saw that the problem was the name he is looking for, but it seems to be because of some character. My code:
$aggregate = array(
array('$match'=>array('culturaNormatizada'=>$cultura, 'ano'=>(int)$ano, 'albaPotential'=>$alba)),
array('$group'=>array('_id'=>'$'.$regiao))
);
$query = $this->mongo_db->aggregate('business_view_final', $aggregate);
The data that it cannot find (sometimes) is the variable $alba. The name Camp-D (Radius) it cannot find, but exists in the database in the column albaPotential. Changing that name, putting another one as an example Nongrass (which is another record) think normally.
It seems to be I don’t know if it’s the -
or the ( )
, but he does not counter because of some character.