Welcome Guest, Not a member yet? Register   Sign In
Filter database results?
#4

[eluser]Noobigniter[/eluser]
No, in your model, modify your function

Code:
function getEntries($category = FALSE)
{
    if($category)
    {
        … your code
    }
    else
    {
        … your code
    }

}

and in your controller, if you want by category
Code:
$data['entries'] = $this->work_model->getEntries($this->uri->segment(2, 0));

I think it is like this and I did not make any mistakes. ( Noobigniter ^^)


Messages In This Thread
Filter database results? - by El Forum - 02-13-2012, 01:18 PM
Filter database results? - by El Forum - 02-13-2012, 01:39 PM
Filter database results? - by El Forum - 02-13-2012, 01:51 PM
Filter database results? - by El Forum - 02-13-2012, 02:00 PM



Theme © iAndrew 2016 - Forum software by © MyBB