[eluser]Dave Blencowe[/eluser]
Changing the get_comments function in the model to this:
Code:
function get_comments($id)
{
$this->db->order_by('id', 'desc');
$this->db->where('post_id', $id);
$this->db->from('content_blog');
$comments = $this->db->get('content_test');
return $comments->row_array();
}
Gives me the following error:
Code:
A Database Error Occurred
Error Number: 1052
Column 'id' in order clause is ambiguous
SELECT * FROM (`content_blog`, `content_test`) WHERE `post_id` = '1' ORDER BY `id` desc
[b]EDIT: Ignore that, I'm an idiot lol. Changing it from content_blog to content_test does nothing.