@@ 62-66 (lines=5) @@ | ||
59 | public function all($row_count, $offset) { |
|
60 | $this->db->order_by('date', 'desc'); |
|
61 | ||
62 | if ($row_count > 0 AND $offset >= 0) { |
|
63 | $query = $this->db->get('comments', $row_count, $offset); |
|
64 | } else { |
|
65 | $query = $this->db->get('comments'); |
|
66 | } |
|
67 | ||
68 | if ($query->num_rows() > 0) { |
|
69 | return $query->result_array(); |
@@ 810-814 (lines=5) @@ | ||
807 | $this->db->order_by($category['order_by'], $category['sort_order']); |
|
808 | ||
809 | if ($count === FALSE) { |
|
810 | if ($row_count > 0) { |
|
811 | $query = $this->db->get('content', (int) $row_count, (int) $offset); |
|
812 | } else { |
|
813 | $query = $this->db->get('content'); |
|
814 | } |
|
815 | } else { |
|
816 | $this->db->from('content'); |
|
817 | return $this->db->count_all_results(); |