filter out more than one category

More
7 years 1 week ago #37769 by n00bster
i want do display the result of some categories with this query:
Code:
SELECT COUNT(*) FROM #__content WHERE catid='85' AND catid='83' AND catid="12" AND state='1'
but this does not work, how can i list the total articles from more than one joomla category?

Please Log in or Create an account to join the conversation.

More
7 years 1 week ago - 7 years 1 week ago #37772 by nordmograph
Something like this should do.
Code:
SELECT COUNT(*) FROM #__content WHERE catid IN ('85' ,'83' ,'12') AND state='1'
Let me know

- Need help? Post the URL of the related page (eventualy as confidential info), it will help solve your issue faster.
- An error, notice or warning? report the exact message including the line number
- If you get a white page , enable error reporting and / or check your server error logs.
Last edit: 7 years 1 week ago by nordmograph.
The following user(s) said Thank You: n00bster

Please Log in or Create an account to join the conversation.

More
7 years 1 week ago #37773 by n00bster
works perfect :)

Please Log in or Create an account to join the conversation.

Time to create page: 0.311 seconds
Powered by Kunena Forum
Disclaimer: Nordmograph is not affiliated with or endorsed by The Joomla! Project™. Any products and services provided through this site are not supported or warrantied by The Joomla! Project or Open Source Matters, Inc. Use of the Joomla!® name, symbol, logo and related trademarks is permitted under a limited license granted by Open Source Matters, Inc.