Welcome Guest, Not a member yet? Register   Sign In
[SOLVED] Filtering results - how to re-set filter to show all
#2

[eluser]LuckyFella73[/eluser]
I can't see an error looking at your code - maybe the error part
is missing in your post?

Just an idea how you could try to get the data (without using sessions):
Code:
# CONTROLLER
$man_value = $this->input->post('gyartok');
if (strlen($man_value)>0)
{
    $filter = $this->input->post('gyartok');
}
else
{
    $filter = '';
}

# call to your model
$data['gyartok'] = $this->your_model->your_method($filter);

# MODEL
function get_manufacturer($filter='')
{
    if (strlen($filter)>0)
    {
        $this->db->where('manufacturer_id', $filter);
    }
    // rest of your code goes here
}

Don't know if you really need to store the values into session, if not
I would prefer to do it without.


Messages In This Thread
[SOLVED] Filtering results - how to re-set filter to show all - by El Forum - 02-16-2011, 07:53 AM



Theme © iAndrew 2016 - Forum software by © MyBB