Например;
Код: Выделить всё
Showing x number of records;
record 1
record 2
record 3
etc
Код: Выделить всё
// select all records
public function selectRecords() {
$this->db->select('*');
$this->db->from('records');
$query = $this->db->get();
return $query->result_array();
}
// count all records
public function countRecords() {
$this->db->select('count(*) as count');
$this->db->from('records');
$query = $this->db->get();
return $query->row();
}
Есть ли более эффективный способ добиться того, чего я хочу?
Подробнее здесь: https://stackoverflow.com/questions/502 ... just-one-t
Мобильная версия