In this tutorial we are going to see how to get only one row. we can easily return one row from database in codeigniter.
I will give you simple example of fetch single record from database using mysql codeigniter.
Sometime we need to get only one record from database. might be you require to get last one row from database or fetch any single row using where or other condition. So just see bellow query how it make done.
$query = $this->db->get();
Another method single line query in codeigniter