Created
May 11, 2014 12:40
-
-
Save araneta/2570f66422af7b1197b8 to your computer and use it in GitHub Desktop.
Joomla: get article by article id
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
$db = &JFactory::getDBO(); | |
$sql = "SELECT introtext FROM #__content WHERE id = ".intval($articleId); | |
$db->setQuery($sql); | |
$fullArticle = $db->loadResult(); | |
if(!strlen(trim($fullArticle))) | |
$fullArticle = "Article is empty "; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment