[eluser]Firstrow[/eluser]
[quote author="manilodisan" date="1225386891"][quote author="OES" date="1225385832"]Yep sorry was not thinking straight there.
why dont you then just perform 2 queries to post to the page.
One for the Article and other for comments.
good Luck[/quote]
And when you have 1000 articles?
1000 = how many queries?
Code:
$articles = array ();
foreach ( $query->result () as $row )
{
$articles [ $row->article_id ] [ 'title' ] = $row->article_title;
$articles [ $row->article_id ] [ 'content' ] = $row->article_content;
$articles [ $row->article_id ] [ 'comments' ] [] = array ( 'coment_id' => $row->comment_id, 'coment_text' => $row->coment_text );
}
echo '<pre>' . print_r ( $articles, TRUE ) . '</pre>';
[/quote]
I think its better use 2 requests =)