I have this problem and i can't find what is wrong. So, my Controller:
$config = array();
$config["base_url"] = base_url() . "products/page/";
$config["total_rows"] = count($this->model_add->countProducts());
$config["per_page"] = 12;
$config["uri_segment"] = 4;
$config["num_links"] = 2;
$config["use_page_numbers"] = true;
model:
public function countProducts() {
$query = $this->db->query("SELECT * FROM `tdt_articles` WHERE `deleted` = 0 AND `article_type` = 3");
return $query->result();
}
My problem is that in my webpage, it shows less pages that it should show. If on $config["total_rows"]
i put exact number of records it shows well, but if i count them like is showed there, it doesn't show me all of them. Can't understand at all what is the problem. Hope you'll help me! Thanks!!!