Est ce que quelqu'un peut m'expliquer une fonction
Posté : 03 sept. 2010, 14:38
Je ne comprend pas à quoi sert cette fonction
function getdetailssoustype2($id)
{
$db = & JFactory :: getDBO();
$query = 'select * from #__f_soustype where id = '.$id.'' ;
$db->setQuery($query);
$result = $db->loadobject();
$query = 'select nom , id_group from #__f_type where id = '.$result->id_type.'' ;
$db->setQuery($query);
$type = $db->loadobject();
$query = 'select nom from #__f_group where id = '.$type->id_group.'' ;
$age_max = $db->loadobject();
$query = 'select nom from #__f_group where age_max <=15 AND !=99';
$db->setQuery($query);
$group = $db->loadresult();
$array['soustype'] = $result;
$array['type'] = $type->nom;
$array['group'] = $group;
$array['age_max'] = $age_max;
return $array;
}