Welcome Guest, Not a member yet? Register   Sign In
Selecting category details and products linked with the same category.
#17

[eluser]Bigil Michael[/eluser]
order by and limit is not working
Code:
function select_fleets($limit, $pgoffset)
           {
        $this->db->limit($limit, $pgoffset);
                $this->db->order_by("category_name","ASC");
        $this->db->select('car_category.category_name, car_category.category_id, car_category.details, car_category.photo');
        $this->db->from('car_category');
        $this->db->join('cars', 'cars.category_id = car_category.category_id');
        $result_product = $this->db->get();
        return $this->db->get('car_category')->result_array();
        }

    function list_fleets($cid)
        {
        $this->db->where('category_id',$cid);
        $result_product = $this->db->get('cars');
        return $result_product->result_array();
        }

can u tell me how to apply limit and orderby category name ascending??
thanks in advance


Messages In This Thread
Selecting category details and products linked with the same category. - by El Forum - 02-07-2011, 03:48 AM



Theme © iAndrew 2016 - Forum software by © MyBB