salve a tutti , ho fatto una query che defe leggere il contenudo di tre tabelle, e dalla principale deve associare li staffid delle altre tabelle, adesso succede che la seconda tabella contiene i valori di un select multiplo , e quindi su un staffid ci possono essere anche 10 valori, pero il problema e che mi ripete il template tpl per quanto sono i valori. perche?Codice PHP:
/**
* edit tech && techassigns && techsignatures
*/
function ViewStaffFromId($staffid)
{
global $dbcore;
global $settings ;
if(empty($staffid))
{
//exit();
return false;
}
$sql = mysql_query("select tech.* , techsignatures. * , techassigns. * from (tech as tech left join techassigns as techassigns on tech. staffid = techassigns. techassignsid)
left join techsignatures as techsignatures on tech. staffid = techsignatures.signatureid where tech. staffid = ". $staffid ." ") or die(mysql_error());
if(!$sql)
{
//exit();
return false;
}
$return = array();
while ($row = mysql_fetch_assoc($sql))
{
$return[] = $row;
}
return $return;
}