SELECT `folder` AS `type`,`element` AS `name`,`params` AS `params`,`extension_id` AS `id`
FROMjoomla_extensionsWHERE enabled = 1 AND type = 'plugin' AND state IN (0,1) AND access IN (1,1,5)
ORDERBY ordering

SELECT `id`,`name`,`rules`,`parent_id`
FROM `joomla_assets`
WHERE `name` IN ('root.1','com_actionlogs','com_admin','com_ajax','com_akeeba','com_associations','com_banners','com_cache','com_categories','com_checkin','com_config','com_contact','com_content','com_contenthistory','com_cpanel','com_csvi','com_djreviews','com_fields','com_finder','com_installer','com_jce','com_jcomments','com_joomlaupdate','com_jshopping','com_languages','com_login','com_mailto','com_media','com_menus','com_messages','com_modules','com_newsfeeds','com_plugins','com_postinstall','com_privacy','com_redirect','com_rsform','com_search','com_smfaq','com_spupgrade','com_tags','com_templates','com_users','com_wrapper','com_xmap')