The variable $offset
that you're using in your query in undefined. You have to pass it in as a method parameter, or use $this->uri->segment(n)
.
Have you read my answer on create jquery pagination?
You have to pass $offset to your method:
function show($offset = 0)
{
// code goes here
}
I'll assume you have an installation of Codeigniter in a folder called "admin", and your controller's name is "accommodation". In that case you have to set $config['base_url']
like this:
$config['base_url'] = 'accommodation/show';
EDIT:
If admin is not the folder you've installed Codeigniter in, but rather a folder inside your controllers folder which has the accommodation controller in it, then you'll have to use this:
$config['base_url'] = 'admin/accommodation/show';
$config['uri_segment'] = 4;
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…