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-
To make the code clear that you are intending to get the first row, CodeIgniter now allows you to use:
if ($query->num_rows() > 0) { return $query->first_row(); }
To retrieve the first row.