CodeIgniter Forums
Problem returning database row - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: Problem returning database row (/showthread.php?tid=38826)



Problem returning database row - El Forum - 02-20-2011

[eluser]eokorie[/eluser]
Has something changed in CI database query system?

I have this simple code in my model file:

Code:
function getArticle($id) {
    $this->db->where('id_art',$id);
    $query = $this->db->get('blog_posts');
    return $query->row();
}

When trying to display the result of this query in my view file, I get the following error:

[code]
A PHP Error was encountered

Severity: 4096

Message: Object of class stdClass could not be converted to string

Filename: libraries/Parser.php

Line Number: 101
[/code

Anyone noticing or having the same problem?


Problem returning database row - El Forum - 02-20-2011

[eluser]eokorie[/eluser]
Never mind... seems to be an issue I am having with a setting up partials with a template library.