Welcome Guest, Not a member yet? Register   Sign In
Model View Controller problems
#8

[eluser]jabga[/eluser]
[quote author="saidai jagan" date="1257171001"]hai u want to display the no.of records dynamically as the user selects like 3,5,10 etc ?

use this,
$no_of_records = 5 // which the user selects
$this->Blog_model->get_last_entries($no_of_records);

function get_last_entries($limit)
{
$query = $this->db->get(‘blog’, $limit);
return $query->result();
}[/quote]
Yes. I would like to display the no.of records dynamically as the user selects.

Our function get_last_entries($limit) is in the model. Please see the $limit varuable, I would like to declare it in controller, and I tried to do, but it's not working.
How can I declare the Limit varuable in the controller?


Messages In This Thread
Model View Controller problems - by El Forum - 11-01-2009, 10:14 PM
Model View Controller problems - by El Forum - 11-01-2009, 10:32 PM
Model View Controller problems - by El Forum - 11-01-2009, 10:44 PM
Model View Controller problems - by El Forum - 11-01-2009, 11:19 PM
Model View Controller problems - by El Forum - 11-02-2009, 01:51 AM
Model View Controller problems - by El Forum - 11-02-2009, 01:58 AM
Model View Controller problems - by El Forum - 11-02-2009, 02:10 AM
Model View Controller problems - by El Forum - 11-02-2009, 02:17 AM
Model View Controller problems - by El Forum - 11-02-2009, 02:23 AM



Theme © iAndrew 2016 - Forum software by © MyBB