<?php



$contactdata = new WA_MySQLi_RS("contactdata",$cmctrfdb,1);

$contactdata->setQuery("SELECT * FROM contacts WHERE contacts.idtrf='$idtrf' AND contacts.kindofcontacts='$kindcontacts'");

$contactdata->execute();

$compid=$contactdata->getColumnVal("companyid");							  

?>