!Oh problema da un milione di dollari , ho provato con il distinct ma non va
Codice PHP:
function ViedDepartmentFromId($staffid){

global 
$dbcore ;
if( empty(
$staffid))
{
return 
false;
}
$dep $dbcore->getlist("select distinct t. *,tass. departmentid ,tass. staffid from tech as t  left join techassigns as tass on  t.staffid = tass.staffid   where t. staffid =  ".intval($staffid)." ");

if( !
$dep ){return false;}

return 
$dep;