Subversion Repositories Applications.referentiel

Rev

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

Rev 51 Rev 142
Line 81... Line 81...
81
		
81
		
82
		$donnees = false;
82
		$donnees = false;
83
		if (isset($projet) && isset($script)) {
83
		if (isset($projet) && isset($script)) {
84
			$requete =	($this->distinct ? 'SELECT DISTINCT' : 'SELECT').' * '.
84
			$requete =	($this->distinct ? 'SELECT DISTINCT' : 'SELECT').' * '.
85
						'FROM ref_traitement '.
85
						'FROM ref_traitement '.
86
						"WHERE referentiel_code = $projet ".
86
						"WHERE ".(($projet == "'tout'") ? '' : 'referentiel_code = '.$projet.' AND ') .
87
						"	AND script = $script ".
87
							" script = $script ".
88
						'	AND date_fin IS NULL '.
88
							' AND date_fin IS NULL '.
89
						'ORDER BY '.((!is_null($this->orderby)) ? $this->orderby  : 'meta_date_creation  DESC').' '.
89
						'ORDER BY '.((!is_null($this->orderby)) ? $this->orderby  : 'meta_date_creation  DESC').' '.
Line 90... Line 90...
90
						'LIMIT 0,1 ';
90
						'LIMIT 0,1 ';
91
			
91
			
Line 118... Line 118...
118
		$donnees = null;
118
		$donnees = null;
119
		if (isset($projet) && isset($script)) {
119
		if (isset($projet) && isset($script)) {
120
			$requete =	($this->distinct ? 'SELECT DISTINCT' : 'SELECT').' * '.
120
			$requete =	($this->distinct ? 'SELECT DISTINCT' : 'SELECT').' * '.
121
						'FROM ref_traitement '.
121
						'FROM ref_traitement '.
122
						"WHERE referentiel_code = $projet ".
122
						"WHERE referentiel_code = $projet ".
123
						"	AND script = $script ".
123
							" AND script = $script ".
124
						'	AND date_debut IS NULL '.
124
							' AND date_debut IS NULL '.
125
						'	AND date_fin IS NULL '.
125
							' AND date_fin IS NULL '.
126
						'ORDER BY '.((!is_null($this->orderby)) ? $this->orderby  : 'meta_date_creation  DESC').' ';
126
						'ORDER BY '.((!is_null($this->orderby)) ? $this->orderby  : 'meta_date_creation  DESC').' ';
Line 127... Line 127...
127
			
127
			
128
			// Récupération des résultats
128
			// Récupération des résultats
129
			try {
129
			try {