I am using codeigniter to get a single result from the db, like this:
$user = $this->db->query("SELECT * FROM users LIMIT 1");
I am then getting the returned object and looping trough it, this way:
foreach ($user->result() as $row) { ... }
As you can imagine, there is not point in using the loop, since there is only one result. Is there a way to get users parameters without looping? Something among this line:
echo $user['name'];
Thanks in advance.