At the moment if I am doing a query on the database that should only return one row, using:
...query stuff... $query = $this->db->get(); $ret = $query-
We can get a single using limit in query
$query = $this->db->get_where('mytable', array('id' => $id), $limit, $offset);