This is the my original SQL query
select 'car' as type,id,title,status from car_product
union
select 'van' as type,id,title,status from van_product
Now I want to run this query using CodeIgniter, so I try to use this one
$this -> db -> select('`car` As type,id,title,status');
$this -> db -> from('car_product');
$this -> db -> where('status =',$status);
$query_car = $this -> db -> get()->result();
$this -> db -> select('`van` As type,id,title,status');
$this -> db -> from('van_product');
$this -> db -> where('status =',$status);
$query_van = $this -> db -> get()->result();
return array_merge($query_car, $query_van);
but it's not working, please can you help?