Created
July 4, 2014 14:39
-
-
Save esedic/f2964525709bdb228bd6 to your computer and use it in GitHub Desktop.
Joomla DB Query
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$db = JFactory::getDBO(); | |
$query = $db->getQuery(true); | |
$query | |
->select($db->quoteName(array('a.id'))) | |
->from($db->quoteName('#__content', 'a')) | |
->join('INNER', $db->quoteName('#__categories', 'b') . ' ON (' . $db->quoteName('b.id') . ' = 38)');//static category id | |
$db->setQuery($query); | |
$results = $db->loadObjectList(); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment