okay just to add some note.. here
some dude from code igniter forum create a simple function to make pagination....
i think this function will work great with all database. and you dont havta use code igniter framework.
im currently using php and mssql server 2005 with Code Igniter Framework
and it works well with the function...
just view it here
code igniter forums
and this is the query that i used :
function get_list($offset){
$sql = "
select top (20) from (
select id,name, ROW_NUMBER() over (order by id) as Result_Number from tm_person) innerSel Where Result_Number >(($offset - 1) *20) Order by Result_Number
)
";
$results = $this->db->query($sql);
return $results->result_array();
}
$offset is number of page values you want to display
and dont forget the paging function read it here code igniter forums
Subscribe to:
Post Comments (Atom)
Starting to Learn Wordpress
I'm gonna start learning wordpress again. I know it's been a while and I'm using Blogger to write everything. I don't know...
-
Well if you don’t know what is Yii Framework. I recommend just go to the main site http://www.yiiframework.com And then http://www.yiiframe...
-
Read the first Part :: Contain the database and basic creating / generating models / crud CJUIDIALOG In these part 2 I will concentra...
-
im currently doing project using PHP 5 and MSSQL SERVER 2005. they use different server. one for web server and the other one is for Databas...
No comments:
Post a Comment