[pLog-general] question about getBlogArticles?

Oscar Renalias phunkphorce at gmail.com
Mon Feb 21 04:59:49 GMT 2005


well I don't know... why would we get all the articles from a blog?
That would in most cases take a long time to process and load the
data.

The getBlogArticles() method has become quite difficult to maintain
but it works now in all the situations where we need it to work. Plus,
we can always add a method called getAllBlogArticles() if needed...

Oscar


On Sat, 19 Feb 2005 20:59:08 +0800, linuxman <subaochen at 126.com> wrote:
> The question is actually about buildWhere, the codes list below:
> 
>             if( $categoryId == -1 )
>                 $query .= " AND c.id = l.category_id AND a.id =
> l.article_id ";
>             else {
>                 if( $categoryId > 0 )
>                     $query .= " AND a.id = l.article_id AND
> l.category_id = $categoryId AND c.id = l.category_id";
>                 else {
>                     $query .= " AND c.id = l.category_id AND a.id =
> l.article_id AND c.in_main_page = 1";
>                 }
>             }
> 
> So, what if we call getBlogArticles by
> $articles->getBlogArticles($blogId)? should return all articles blongs
> to that $blogId? But the default parameter of categoryId is 0, is
> buildWhere part will be :
> 
> $query .= " AND c.id = l.category_id AND a.id = l.article_id AND
> c.in_main_page = 1";
> 
> You can see, will return all articles that showed in main page.
> 
> Any idea? remove AND c.in_main_page = 1 in buildWhere function?
> 
> Best regards,
> 
> Su Baochen
> 
> _______________________________________________
> pLog-general mailing list
> pLog-general at devel.plogworld.net
> http://devel.plogworld.net/mailman/listinfo/plog-general
>



More information about the pLog-general mailing list