[thesite] [bug] t.e.o. - Other Articles Written by this Author

.jeff jeff at members.evolt.org
Fri Nov 16 14:47:08 CST 2001


rudy,

><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
> From: rudy
>
> as for the question, which i think was prompted by
> michele's comments about wanting credit for her faq
> articles, what was the question?  does it have to do
> with how to query the categories?
><><><><><><><><><><><><><><><><><><><><><><><><><><><><><

how to take this query, which keeps articles in certain categories from
being returned:

  SELECT content.contentid
       , content.contentname
       , content.synopsis
       , content.ratings
       , content.rating
       , content.replies
       , content.categoryid
       , content.datemod
       , (SELECT category
            FROM categorys
           WHERE categorys.categoryid = content.categoryid
         ) AS category
    FROM content
   WHERE content.userid = #Val(getarticle.userid)#
     AND content.categoryid NOT IN (1, 23, 26, 9741)
     AND content.contentid <> #Val(url.aid)#
     AND content.signoff = 1
   ORDER BY content.rating DESC
       , content.ratings DESC
       , content.datemod ASC

and change it so it will return articles in all categories, but ordered such
that articles with a categoryid of 1, 23, 26, or 9741 appear last in the
results?

thanks,

.jeff

http://evolt.org/
jeff at members.evolt.org
http://members.evolt.org/jeff/






More information about the thesite mailing list