예제 #1
0
파일: Photos.php 프로젝트: bersace/strass
 function findUnites()
 {
     $t = new Unites();
     $s = $t->select()->setIntegrityCheck(false)->from('unite')->join('participation', 'participation.unite = unite.id', array())->where('participation.activite = ?', $this->activite);
     return $t->fetchAll($s);
 }
예제 #2
0
 function findUnitesParticipantesExplicites()
 {
     $t = new Unites();
     $s = $t->select()->setIntegrityCheck(false)->distinct()->from('unite')->joinLeft('participation', 'participation.unite = unite.id', array())->joinLeft(array('mere' => 'unite'), 'mere.id = unite.parent', array())->joinLeft(array('part_mere' => 'participation'), 'part_mere.unite = mere.id AND ' . 'part_mere.activite = participation.activite', array())->where('participation.activite = ?', $this->id)->where('part_mere.id IS NULL');
     return $t->fetchAll($s);
 }
예제 #3
0
 function findUnites($actif = TRUE)
 {
     $t = new Unites();
     $s = $t->select()->setIntegrityCheck(false)->distinct()->from('unite')->joinLeft(array('parent' => 'unite'), 'parent.id = unite.parent', array())->joinLeft(array('grandparent' => 'unite'), 'grandparent.id = parent.parent', array())->join('appartenance', 'appartenance.unite IN (unite.id, parent.id, grandparent.id)', array())->where('appartenance.individu = ?', $this->id);
     if ($actif === true) {
         $s->where('appartenance.fin IS NULL');
     } else {
         if ($actif === false) {
             $s->where('appartenance.fin IS NOT NULL');
         }
     }
     return $t->fetchAll($s);
 }
예제 #4
0
 function findUnite()
 {
     $t = new Unites();
     $s = $t->select()->setIntegrityCheck(false)->from('unite')->join('unite_document', 'unite_document.unite = unite.id', array())->where('unite_document.document = ?', $this->id);
     return $t->fetchOne($s);
 }
예제 #5
0
파일: Journaux.php 프로젝트: bersace/strass
 function findUnite()
 {
     $t = new Unites();
     $s = $t->select()->setIntegrityCheck(false)->from('unite')->join('journal', 'journal.unite = unite.id', array())->where('journal.id = ?', $this->journal);
     return $t->fetchOne($s);
 }