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-
If you require to get only one record from database table using codeigniter query then you can do it using row(). we can easily return one row from database in codeigniter.
$data = $this->db->get("items")->row();