Welcome Guest, Not a member yet? Register   Sign In
pagination
#6

[eluser]xwero[/eluser]
@blackdogfnq : i think you better create your own pagination because the CI pagination is not build for that purpose.
In your model you could have these methods
Code:
// returns object with the present first letters
function get_links()
{  
    return $this->db->query('select distinct substring(filename,1,1) as first from table order by substring(filename,1,1)');
}
// returns files with a first letter
function get_files_by_first_letter($letter)
{
   return $this->db->query('select filename from table where filename like "'.$letter.'%"');
}
Pagination of this type is easier because you have a limited range.


Messages In This Thread
pagination - by El Forum - 12-12-2007, 12:43 PM
pagination - by El Forum - 12-12-2007, 01:26 PM
pagination - by El Forum - 12-12-2007, 02:38 PM
pagination - by El Forum - 12-16-2007, 11:43 AM
pagination - by El Forum - 12-16-2007, 10:03 PM
pagination - by El Forum - 12-17-2007, 03:23 AM
pagination - by El Forum - 12-17-2007, 03:28 AM



Theme © iAndrew 2016 - Forum software by © MyBB