小编Kap*_*att的帖子

How to use parameter in function with pagination CodeIgniter?

I have function which takes state name as a parameter and displays all the cities of that specific state. Since list of cities is very long I have used pagination in the same function but when I click on the 'Next' or any other pagination link the function accepts the offset value in the $state variable. The function is

public function load_Page($state){
    $this->load->database();
    $this->load->library('pagination');
    $a = 1;

    $this->db->select("*")->where("userstate" , $a)->where("state" , $state);
    $query0 = $this->db->get("city");

            $this->db->select("*")->where("userstate" , $a)->where("state" , $state); …
Run Code Online (Sandbox Code Playgroud)

php pagination codeigniter codeigniter-3

5
推荐指数
1
解决办法
497
查看次数

标签 统计

codeigniter ×1

codeigniter-3 ×1

pagination ×1

php ×1