[Solved] Fetch category and article list joomla
<?php $db = &JFactory::getDBO(); $query = “SELECT DISTINCT title FROM #__categories WHERE published = ‘1’ ORDER BY level”; $db->setQuery($query); $rows = $db->loadObjectList(); ?> <?php foreach ($rows as $row) { $query = “SELECT id FROM #__categories WHERE title = ” . $row->title . ” AND published = ‘1’ LIMIT 1 “; $db->setQuery($query); $rowid = $db->loadResult(); ?> … Read more