Ciao
stò creando un componente joomla,
il componente deve solo fare una select ed inserire i dati all'interno di una tabella....
Il momponente non da nessun errore ma non funziona nenache.... cioè non visualizza nulla



Vi posto il codice in modo che possiate aiutarmi e soprattutto che qualcun altro lo possa usare se ne ha necessità:

components/com_allarmi/allarmi.php
codice:
<?php
//no direct access
defined('_JEXEC') or die('Restricted access');
 
echo '
<div class="componentheading">Allarmi';
 
jimport('joomla.application.helper');
require_once(JApplicationHelper::getPath('html'));
JTable::addIncludePath(JPATH_ADMINISTRATOR.DS.'components'.DS.$option.DS.'tables');
 
switch($task) {
  default:
  	showAllarmi($option);
	break;
}
 
function showAllarmi($option) {
	$user =& JFactory::getUser();
	$db =& JFactory::getDBO();
	$query = "SELECT title,alias,title_alias FROM #__content";
	$db->setQuery($query);
	$rows = $db->loadObjectList();
	if ($db->getErrorNum()) {
		echo $db->stderr();
		return false;
	}
	
	HTML_allarmi::showAllarmi($rows, $option);
}
?>
components/com_allarmi/allarmi.html.php
codice:
<?php
//no direct access
defined('_JEXEC') or die('Restricted access');
 class HTML_allarmi {
	function showAllarmi($rows, $option) {
		?>


		
<table>
<tr>
<td>ID</td>
<td>TITOLO</td>
<td>TT</td>
</tr>
<?php
foreach ($rows as $row) {
			echo '
<tr>
<td>'.$row->alias.'</td>
<td></td>
<td></td>
<td></td>
</tr>
 ';
		}

?>

</table>
 
<?php
	}
}
?>

components/com_allarmi/tables/allarme.php
codice:
<?php
//no direct access
defined('_JEXEC') or die('Restricted access');
 
class TableAllarme extends JTable {
	var $id = null;
	var $user = null;
	var $orario = null;
	var $giorno = null;
 
	function __construct(&$db) {
		parent::__construct( '#__allarmi', 'id', $db);
	}
}
?>

Se qualcuno riesce a capire il perchè non visulizza le righe che tornano dalla select.