Subversion Repositories eFlore/Applications.coel

Compare Revisions

Ignore whitespace Rev 1636 → Rev 1765

/trunk/jrest/services/CoelCommentaire.php
23,7 → 23,7
$info = array();
 
// Pré traitement des paramêtres
$p = $this->traiterParametresUrl(array('id_projet', 'id_commentaire', 'recherche'), $param);
$p = $this->traiterParametresUrl(array('id_commentaire', 'recherche'), $param);
 
// Construction de la requête
$requete = (($this->distinct) ? 'SELECT DISTINCT' : 'SELECT').' ccm.*, '.
34,7 → 34,6
' LEFT JOIN coel_collection_a_commentaire AS ccac ON (ccm_id_commentaire = ccac_id_commentaire) '.
' LEFT JOIN coel_collection ON (ccac_id_collection = cc_id_collection) '.
((count($p) != 0) ? 'WHERE ' : '').
(isset($p['id_projet']) ? "AND ccm_ce_projet = {$p['id_projet']} " : '').
(isset($p['id_commentaire']) ? "AND ccm_id_commentaire = {$p['id_commentaire']} " : '').
(isset($p['recherche']) ? $this->construireWhereRecherche($p['recherche']) : '').
'ORDER BY '.((!is_null($this->orderby)) ? $this->orderby : 'ccm_id_commentaire ASC').' ';