I have a model :
PHP Code:
public function biens_vente()
{
$query = $this->db->select('')
->from('biens')
->where('actif', '1')
->where('rent','0')
->get();
if($query->num_rows()!==0)
{
return $query->result();
}
else
{
return FALSE;
}
}
and a Controller :
PHP Code:
public function ventes()
{
if($this->Biens_model->biens_vente()== FALSE)
{
$this->data['erreur'] = "BLABLABLA";
}
else
{
$this->data['biens'] = $this->Biens_model->biens_vente();
}
$this->data['title'] = "VENTE";
$this->render('vente_view');
}
In the results I got rows like 'slide1' 'slide2' .... if the row is empty,
I would like to filter the empty rows as I would with an array_filter() before sending to view
How can I do that properly ?