Welcome Guest, Not a member yet? Register   Sign In
Pagination automated
#9

[eluser]dine[/eluser]
Hi

I am using your lib. and do the same as you mentioned above.
but I am not getting the exact and expected result.

i am using GET method here.. and query string is like..

Code:
[
http://abc.com/index.php/search/do_search?keywords=&search_type=all&search_in=Entire_Resume&MinYear;=&MinCurrentSalary;=&MaxCurrentSalary;=&City;[]=&Segment;=&Area;=
/code]

I am writing query in search form so my query starts with
[code]
$query = "select SQL_CALC_FOUND_ROWS * from tbl_users where 1=1 ";

after a long if else condition , finally my query saves in $query variable and Before implementing limit I make a clone of this variable

$total_result_query = $query;
$sql_total_query = $this->db->query("Select FOUND_ROWS() as numObjects");
$rs = $sql_total_query->result_array();
$numEvents = $rs[0]['numObjects'];


$config['total_rows'] = $rs[0]['numObjects']; // count all records
$config['per_page'] = 10; // You'd best set rows per page in a config file, but hey
$this->pagination->initialize($config); // initialize pagination


// Create pagination links
$data['pagination_links'] = $this->pagination->create_links();
        
// Retrieve paginated results, using the dynamically determined offset
$this->db->limit($config['per_page'], $this->pagination->offset);
        //}


$sql = $this->db->query($query);

My problem is, query not including limit at the end.


please Guide me as it's very urgent and i am new in this.


Messages In This Thread
Pagination automated - by El Forum - 07-27-2008, 12:07 PM
Pagination automated - by El Forum - 07-27-2008, 12:13 PM
Pagination automated - by El Forum - 07-27-2008, 12:39 PM
Pagination automated - by El Forum - 08-31-2008, 07:40 PM
Pagination automated - by El Forum - 09-01-2008, 12:19 AM
Pagination automated - by El Forum - 10-07-2008, 05:36 AM
Pagination automated - by El Forum - 12-21-2008, 07:05 AM
Pagination automated - by El Forum - 01-03-2009, 08:42 PM
Pagination automated - by El Forum - 05-30-2009, 10:17 AM
Pagination automated - by El Forum - 05-30-2009, 10:29 AM
Pagination automated - by El Forum - 06-01-2009, 07:43 AM
Pagination automated - by El Forum - 10-25-2009, 06:27 PM
Pagination automated - by El Forum - 01-02-2010, 06:42 AM
Pagination automated - by El Forum - 01-07-2010, 08:37 AM
Pagination automated - by El Forum - 10-31-2010, 10:02 PM
Pagination automated - by El Forum - 01-05-2011, 04:33 AM
Pagination automated - by El Forum - 02-22-2011, 02:14 AM
Pagination automated - by El Forum - 02-22-2011, 03:59 AM
Pagination automated - by El Forum - 05-10-2013, 11:42 AM
Pagination automated - by El Forum - 07-17-2013, 11:42 PM
Pagination automated - by El Forum - 01-12-2014, 12:23 PM



Theme © iAndrew 2016 - Forum software by © MyBB