Pagination Not working
Permalink
Working on a new package, and pagination seems to display all the items on one page even though I've specified a limit lower than the number that appear. Controller code: I feel like it has something to do with the page number, but I really don't know, but maybe i'm supposed to have something in view? Right now all I have in view related to paging is So far I've been going off the log dashboard page to get this btw.
public function view($page=0){ $sql="SELECT COUNT(email) FROM tableName"; $total=$db->query($sql); $total=str_replace('COUNT(email)','', $total); $query = "SELECT * FROM tableName "; $rows = $db->getAll($query); $paginator->init(intval($page), $total, View::url('/invite_list'), 10); $this->set('rows', $rows); }