Tuesday, April 20, 2010

how to view data from joomla table

defined('_JEXEC') or die('Restricted access');
JToolBarHelper::title(JText::_('data_project'), 'generic.png');
JToolBarHelper::preferences('com_data_project');

echo "dsads";

$db = JFactory::getDBO();

$query = "SELECT *"
. " FROM #__banner"
;
$db->setQuery($query);
$rows = $db->loadObjectList();
print_r($rows);


foreach($rows as $row)
{
echo "";
echo "$row->bid";
echo "$row->fieldname";
echo "";
}

?>

This is the default administrator view of your component. To edit it please edit the file:

/administrator/components/com_data_project/views/default/tmpl/default.php

No comments:

Post a Comment