Hi, I'm trying to display some selected fields from the database in a module. To do this, I created a module and I added new fields to submitcontent form. when I retrieve the 'title' field of submitcontent form, everything is ok, but I was unable to get the other fields and my new added fields into the module. my code is below;
what might be the problem? everything seems ok when I look into the database.
<?php
defined('_JEXEC') or die('Restricted access');
$number = $params->get('number', 2);
$db =& JFactory::getDBO();
$query="SELECT title FROM #__content";
$db->setQuery( $query, 0, $number );
$rows = $db->loadObjectList();
foreach($rows as $row){
echo "$row->title"."<br />";
}
?>
what might be the problem? everything seems ok when I look into the database.