SyntaxFix
Write A Post
Hire A Developer
Questions
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.