Welcome Guest, Not a member yet? Register   Sign In
Output buffering error... But why?
#2

[eluser]cahva[/eluser]
As I dont know exatcly what goes on in the rest of your controller, I assume the method's parameter should not be an array. Also I think you should just get the row with all the fields you need in one go from model.

Try this(I dont know if it will work as I said I dont know the big picture).

asset_mod model:
Code:
function get_asset($asset_id = FALSE)
{
    if (!$asset_id)
    {
        return FALSE;
    }
    
    $row = $this->db->where('asset_id',$asset_id)->get('Assets')->row();
    
    return $row; // will return FALSE if not found
}

details method from your controller:
Code:
function details($asset_id = FALSE)
{
    if (!$asset_id)
    {
        redirect('catalog');
    }
    
    $asset = $this->assets_mod->get_asset($asset_id);
    
    if (!$asset)
    {
        redirect('catalog');
    }
    
    $data = array(
        'page_title' => 'Details',
        'page_desc' => $asset->page_desc,
        'asset_url' => $asset->asset_url,
        'content' => 'view_asset'
    );
    
    $this->load->view('template', $data);
}

Was this what you were after?


Messages In This Thread
Output buffering error... But why? - by El Forum - 10-21-2010, 06:17 PM
Output buffering error... But why? - by El Forum - 10-21-2010, 06:53 PM
Output buffering error... But why? - by El Forum - 10-21-2010, 07:30 PM
Output buffering error... But why? - by El Forum - 10-21-2010, 10:56 PM



Theme © iAndrew 2016 - Forum software by © MyBB