Subversion Repositories eFlore/Applications.del

Rev

Rev 2199 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2199 Rev 2213
Line 108... Line 108...
108
		}
108
		}
109
	}
109
	}
Line 110... Line 110...
110
 
110
 
111
	public function getWhere() {
111
	public function getWhere() {
112
		// Sous-requete spéciale pour éviter de rechercher dans la table obs jointe à img depuis Pictoflora...
-
 
113
		//print_r($this->requete);
112
		// Sous-requete spéciale pour éviter de rechercher dans la table obs jointe à img depuis Pictoflora...
114
		if (isset($this->requete['where']['OR_SOUS_REQUETE']) && count($this->requete['where']['OR_SOUS_REQUETE']) > 0) {
113
		if (isset($this->requete['where']['OR_SOUS_REQUETE']) && count($this->requete['where']['OR_SOUS_REQUETE']) > 0) {
115
			$clauseWhereSousRequete = implode(' OR ', $this->requete['where']['OR_SOUS_REQUETE']);
114
			$clauseWhereSousRequete = implode(' OR ', $this->requete['where']['OR_SOUS_REQUETE']);
116
			$sousRequete = 'di.ce_observation IN '.
115
			$sousRequete = 'di.ce_observation IN '.
117
				"(SELECT id_observation FROM del_observation AS do WHERE $clauseWhereSousRequete ) ";
116
				"(SELECT id_observation FROM del_observation AS do WHERE $clauseWhereSousRequete ) ";
Line 860... Line 859...
860
	}
859
	}
Line 861... Line 860...
861
	
860
	
862
	private function getCombinaisonChampsDateMax() {
861
	private function getCombinaisonChampsDateMax() {
863
		return "GREATEST(IFNULL(dc.date,0), IFNULL(dcv.date,0), IFNULL(do.date_observation,0), IFNULL(dcp.date_validation,0), IFNULL(dcpr.date,0))";
862
		return "GREATEST(IFNULL(dc.date,0), IFNULL(dcv.date,0), IFNULL(do.date_observation,0), IFNULL(dcp.date_validation,0), IFNULL(dcpr.date,0))";
864
	}
863
	}
865
}
864
}