Join two table in Magento
$attrubutesdata = Mage::getModel(‘contacts/attrubutes’)->getCollection();
$this->setCollection($attrubutesdata);
$this->getCollection()->getSelect()->join(array(‘te’=>’forms_entity’),’main_table.entity_id=te.entity_id’,array(‘entity_name’=>’te.entity_name’));