Tutorialsplane

Codeigniter get single row


Codeigniter get single row– We can get single row from codeigniter very easily.


Codeigniter get single row Example

You can get the single row from query result in codeigniter simply as below –

Example:

$query = $this->db->query("YOUR QUERY");
$result = $query->result_array();
$singleRow = $result[0];

The above example will return the single row data form the returned result.