Generates a platform-specific query string that counts all records
returned by an Active Record query.
public count_all_results ( $table = '' ) : string | ||
return | string |
/** * Return the number of results for the current query * */ public function count() { //If data has already been selected return the row count if (sizeof($this->all()) > 0) { return sizeof($this->all()); } else { $this->db->from($this->_table()); return $this->db->count_all_results(); } }