Search and List via Json_decode

0

I have the following tables:

Whendoingthebrandsearchthroughtheinputpost,Ineedtolistalltheproductsthatcontaintheidoftheselectedbrand.Belowismyexcerpt.

$marca=$this->input->post('marca');$marca=explode(',',$marca);if(count($marca)>0){$i=0;foreach($marcaas$row){$i++;if($row!=="") {
             if ($row !== "0") {
              $query[] = $row;
              $this->db->where_in(' marca_id ', $query);

                    } 
            }
}       
 }

This section only lists if the marca_id field has an integer, I know I have to use the json_decode function, but I can not get the expected result.

    
asked by anonymous 17.10.2017 / 13:31

0 answers