Subversion Repositories eFlore/Applications.cel

Rev

Rev 1334 | Rev 1339 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1334 Rev 1335
Line 662... Line 662...
662
						$this->construireWhereNomTaxon().
662
						$this->construireWhereNomTaxon().
663
						$this->construireWhereProjet().
663
						$this->construireWhereProjet().
664
						(!$this->etreNull($tag_sql) ? "AND ($tag_sql) " : '').
664
						(!$this->etreNull($tag_sql) ? "AND ($tag_sql) " : '').
665
						'ORDER BY utilisateur ASC, ci.ordre ASC';
665
						'ORDER BY utilisateur ASC, ci.ordre ASC';
666
			//$this->debug[] = $requete;
666
			//$this->debug[] = $requete;
667
			//die($requete);
667
			die($requete);
668
			$elements_tag = $this->executerRequete($requete);
668
			$elements_tag = $this->executerRequete($requete);
Line 669... Line 669...
669
			
669
			
670
			$requete_tag = array();
670
			$requete_tag = array();
Line 702... Line 702...
702
	 * Traitement de $tag pour construction du filtre dans la requête
702
	 * Traitement de $tag pour construction du filtre dans la requête
703
	 */
703
	 */
704
	private function getSqlWhereMotsCles($tag) {
704
	private function getSqlWhereMotsCles($tag) {
705
		$sql = null;
705
		$sql = null;
706
		$mots_cles = $this->decomposerParametreTag($tag);
706
		$mots_cles = $this->decomposerParametreTag($tag);
707
		$requete_projet = $this->getSqlWhereMotsClesImages($mots_cles['motsClesEncodesProteges']);
707
		$requete_projet = $this->getSqlWhereMotsClesImages($mots_cles);
708
		$sql = $requete_projet;
708
		$sql = $requete_projet;
709
		//$this->debug[] = $sql;
709
		//$this->debug[] = $sql;
710
		return $sql;
710
		return $sql;
711
	}
711
	}
Line 712... Line 712...
712
	
712
	
713
	/**
713
	/**
714
	 * Traitement de $tag pour construction du filtre dans la requête
714
	 * Traitement de $tag pour construction du filtre dans la requête
715
	 */
715
	 */
716
	private function getSqlWhereMotsClesImages($mots_cles_encodes) {
716
	private function getSqlWhereMotsClesImages($mots_cles_encodes) {
717
		$where_mots_cles_images = array();
717
		$where_mots_cles_images = array();
718
		foreach ($mots_cles_encodes as $mot_cle_encode) {
718
		foreach ($mots_cles_encodes['motsClesEncodesProteges'] as $mot_cle_encode) {
719
			$where_mots_cles_images[] = "ci.mots_cles_texte LIKE $mot_cle_encode";
719
			$where_mots_cles_images[] = "ci.mots_cles_texte LIKE $mot_cle_encode";
720
		}
720
		}
721
		$where_mots_cles_images = implode(' OR ', $where_mots_cles_images);
721
		$where_mots_cles_images = implode(' '.$mots_cles_encodes['type'].' ', $where_mots_cles_images);
722
		return $where_mots_cles_images;
722
		return $where_mots_cles_images;
Line 723... Line 723...
723
	}
723
	}
Line 736... Line 736...
736
		}
736
		}
Line 737... Line 737...
737
		
737
		
738
		foreach ($mots_cles['motsCles'] as $mot) {
738
		foreach ($mots_cles['motsCles'] as $mot) {
739
			$mots_cles['motsClesEncodesProteges'][] = $this->bdd->quote('%'.$mot.'%');
739
			$mots_cles['motsClesEncodesProteges'][] = $this->bdd->quote('%'.$mot.'%');
740
		}
-
 
741
		//print_r($mots_cles); exit;
740
		}
742
		$this->debug[] = $mots_cles;
741
		$this->debug[] = $mots_cles;
743
		return $mots_cles;
742
		return $mots_cles;
Line 744... Line 743...
744
	}
743
	}