Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.
Not a member yet? Click here to register.
Forgot Password?

Displaying all article categories

Asked Modified Viewed 1,509 times
S
subodh
S
subodh 10
I am learner keen to learn more.
---------------------------------------------------------

Gamers Worlds : The Worlds Of Gamers
  • Junior Member, joined since
  • Contributed 46 posts on the community forums.
  • Started 25 threads in the forums
  • Started this discussions
asked
Junior Member

Hi,
It has been seen article categories with 0 articles not shown on article page.
How can I make that all articles categories displayed on page even if they don't have any articles in it?
0 replies

1 post

F
Falk
F
Falk 131
Need help?, Having trouble?
• View our Documentation for Guides, Standards and Functions
• Name and Organize your Topics and Content correctly in the corresponding Forums for best support results
• Attaching Log Files and Screenshots when reporting issues will help
• Provide with an URL to live example if one exists
• Please read the How to Report an Error post
• Please read and comply with the Code of Conduct

(¯·._.·(¯°·._.·°º*[ Project Manager ]*º°·._.·°¯)·._.·¯)
  • Super Admin, joined since
  • Contributed 6,201 posts on the community forums.
  • Started 639 threads in the forums
  • Answered 11 questions
answered
Super Admin

Heya,
Open articles.php find
//$result = dbquery("SELECT article_cat_id, article_cat_name, article_cat_description FROM ".DB_ARTICLE_CATS." WHERE ".groupaccess('article_cat_access')." ORDER BY article_cat_name");

remove the // before $result and then remove these lines below it and try,
   // NEW QUERY
   $result = dbquery(
      "SELECT ac.article_cat_id, ac.article_cat_name, ac.article_cat_description, COUNT(a.article_cat) AS article_count FROM ".DB_ARTICLES." a
      LEFT JOIN ".DB_ARTICLE_CATS." ac ON a.article_cat=ac.article_cat_id
      WHERE ".groupaccess('ac.article_cat_access')."
      GROUP BY ac.article_cat_id
      ORDER BY ac.article_cat_name"
   );
0 replies

Labels

None yet

Statistics

  • Views 0 views
  • Posts 1 post
  • Votes 0 votes
  • Topic users 2 members

2 participants

F
F
Falk 131
Need help?, Having trouble?
• View our Documentation for Guides, Standards and Functions
• Name and Organize your Topics and Content correctly in the corresponding Forums for best support results
• Attaching Log Files and Screenshots when reporting issues will help
• Provide with an URL to live example if one exists
• Please read the How to Report an Error post
• Please read and comply with the Code of Conduct

(¯·._.·(¯°·._.·°º*[ Project Manager ]*º°·._.·°¯)·._.·¯)
  • Super Admin, joined since
  • Contributed 6,201 posts on the community forums.
  • Started 639 threads in the forums
  • Answered 11 questions
S
S
subodh 10
I am learner keen to learn more.
---------------------------------------------------------

Gamers Worlds : The Worlds Of Gamers
  • Junior Member, joined since
  • Contributed 46 posts on the community forums.
  • Started 25 threads in the forums
  • Started this discussions

Notifications

Track thread

You are not receiving notifications from this thread.

Related Questions

Not yet