I have Joomla 2.5, where the article includes parents and sub categories I like the following:
- Article 1 categories are News - & gt; Complex - & gt; Institute
- Article 2 categories are News - & gt; Complex - & gt; Universities
- Article 3 categories are News - & gt; Complex - & gt; Institute
- Article 4 categories are News - & gt; Complex - & gt; Universities
Here, the parents of the categories of news campus, and so on. I know that there is a unique catidade in each category but, in the database, Joomla only records every article based on the previous category. Therefore, if I want to get articles based on the News ID, the result is empty. So, I have to choose Institute or University ID but, what I want, how to get an article together with the institute and university categories.
Can anyone help me solve the problem with Joomla 2.5 PHP?
are stored as categories if you retrieve the 'News' category from the database The columns 'LFT' and 'RGT' have range values for all sub-categories. Query
Seo # as categories from SELECT * #__categories as parent category. Parent.lft as parent and parent.rgt WHERE parent.id = 3
will give you all the sub-categories of category along with id 3. Use the 'News' category ID instead.
Please keep in mind that the query has not been optimized and is intended to clarify the approach only
No comments:
Post a Comment