salve ragazzi io ho un grosso problema con una query , da una tabella del dtabase , devo estrarre gli iddepartments tramite gli idstaff , adesso succede che se uno staffa ha 10 dipartimenti assegniati sara ripetuto il suo id e mimoltivplica tutti i alori per quanti id trova cosa posso fare?
Codice PHP:
function ViedDepartmentFromId($staffid){

global 
$dbcore ;
if( empty(
$staffid))
{
return 
false;
}
$dep $dbcore->getlist("select distinct  * from  techassigns    where  staffid =  ".intval($staffid)." ");

if( !
$dep ){return false;}

return 
$dep;