[eluser]Jim-Bingo[/eluser]
Hi!
I have a problem with my Join.
Code:
$this->db->select('*, news.date as newsdate, news.content as newscontent');
$this->db->from('news');
$this->db->join('news_comments', 'news_comments.nid = news.id');
$this->db->limit('3');
$query = $this->db->get();
return $query;
I want it to print out the news and all comments that belong to it.
Like this
News 1
comment
comment
comment
News 2
comment
comment
News 3
comment
comment
How do I do that?
Hope you understand. Sorry for my bad english.