{source}
<!-- You can place html anywhere within the source tags -->

<script language="javascript" type="text/javascript">
// You can place JavaScript like this

</script>
<?php

// Get a database object
$db = JFactory::getDbo();

$query = $db->getQuery(true);
$query->select('DISTINCT regione');
$query->from('arches_census');

// sets up a database query for later execution
$db->setQuery($query);

// fetch result as an object list
$result = $db->loadObjectList();

for ($n=0; $n<count($result); $n++) {
$regione = (string)$result[$n]->regione;

$query2 = $db->getQuery(true);
$query2 = "SELECT flusso FROM arches_census WHERE regione = ".$db->quote($regione);
$db->setQuery($query2);
$result2 = $db->loadObjectList();

$filterURL = "index.php?option=com_fabrik&view=list&listid=1&Itemid=604&lang=it&arches_census___regione=".$regione;

 

echo "<a href='".$filterURL."'>$regione(".count($result2).")</a><br>";

}

?>
{/source}

Condividi questo articolo