setQuery("SELECT * FROM `trf-details`
LEFT JOIN auth_users ON `trf-details`.iduser=auth_users.id
LEFT JOIN article_type ON `trf-details`.idarticletype=article_type.idarticletype
LEFT JOIN certificationtype ON certificationtype.idcertificationtype=`trf-details`.idcertification
WHERE `trf-details`.idcompany='$idcompany'
AND `trf-details`.signedon <> ''
ORDER BY `trf-details`.trfnumber");
$archivetrflist->execute(); ?>
setQuery("SELECT * FROM `trf-details`
LEFT JOIN article_type ON `trf-details`.idarticletype=article_type.idarticletype
LEFT JOIN certificationtype ON certificationtype.idcertificationtype=`trf-details`.idcertification
WHERE `trf-details`.iduser='$iduserlogin'
AND `trf-details`.signedon =''
AND `trf-details`.revcs != 'Y'
ORDER BY `trf-details`.trfnumber");
$drafttrf->execute();
?>