예제 #1
0
파일: Unites.php 프로젝트: bersace/strass
 function findDocuments()
 {
     $t = new Documents();
     $db = $t->getAdapter();
     $s = $t->select()->setIntegrityCheck(false)->distinct()->from('document')->join('unite_document', 'unite_document.document = document.id', array())->joinLeft(array('parent' => 'unite'), $db->quoteInto('parent.id = ?', $this->parent), array())->where('unite_document.unite IN (?, parent.id, parent.parent)', $this->id)->order('date DESC');
     return $t->fetchAll($s);
 }