I'm new to CI so guys request to help me in displaying result for pagination link. In database, I have 3 records I'm displaying a single record for each page page.
Problem is in my pagination link when i select next numeric link of pagination result is not being displayed.
Thing is that that when I click on number 2 of pagination link output shows $results is empty and I am not getting any values for echo $data->email.
I'm not able to get an answer through google too But one record is being displayed when the page load's problem is when I select pagination link of next numeric link it is not working. Pagination script is not working properly i think it is related to offset.
Here is my controller.
public function login($look, $age, $age_to, $age_from, $se_ct, $subsect, $coun_try, $sta_te, $ci_ty, $qualification)
{
return $this->db->query("SELECT *FROM users WHERE gender = '$look' And status='1'")->result();
}
So what might be the error I'm not sure so I am posting my code below please go through it and and help me.
**Here is my view page**
if (empty($results)) {
echo 'Results set is empty';
} else {
foreach ($results as $data) {
echo $data->email.'<br />';
}
}
echo $pagination_links;
//Error is when i select next numeric link of pagination record is not being fetched from database getting output as emty result in my view page.so request you to help me in solving the issue and more warning message is missiing argument 2 for Searchresult::users() , and more errror message is undefined variable offset .