예제 #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);
 }
예제 #2
0
파일: Journaux.php 프로젝트: bersace/strass
 function findDocument()
 {
     $t = new Documents();
     $db = $t->getAdapter();
     $s = $t->select()->setIntegrityCheck(false)->distinct()->from('document')->join('article_document', 'article_document.document = document.id', array())->where('article_document.article = ?', $this->id)->limit(1);
     return $t->fetchOne($s);
 }