Subversion Repositories eFlore/Applications.cel

Rev

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

Rev 2042 Rev 2043
Line 313... Line 313...
313
    public function formaterPourEnvoiCel(&$tableau_images) {
313
    public function formaterPourEnvoiCel(&$tableau_images) {
314
    	foreach($tableau_images as &$image) {
314
    	foreach($tableau_images as &$image) {
315
    		$ids_mots_cles = $this->getIdsMotsClesImage($image['id_image']);
315
    		$ids_mots_cles = $this->getIdsMotsClesImage($image['id_image']);
316
    		$mots_cles_chaine = '';
316
    		$mots_cles_chaine = '';
317
    		foreach($ids_mots_cles as $id_mot_cle) {
317
    		foreach($ids_mots_cles as $id_mot_cle) {
318
    			$mots_cles_chaine .= $id_mot_cle['id_mot_cle_image'].',';
318
    			$mots_cles_chaine .= $id_mot_cle['id_mot_cle'].',';
319
    		}
319
    		}
320
    		$mots_cles_chaine = rtrim($mots_cles_chaine,',');
320
    		$mots_cles_chaine = rtrim($mots_cles_chaine,',');
321
    		$image['mots_cles'] = $mots_cles_chaine;
321
    		$image['mots_cles'] = $mots_cles_chaine;
322
    	}
322
    	}
Line 337... Line 337...
337
	    return $retour;
337
	    return $retour;
338
    }
338
    }
Line 339... Line 339...
339
    
339
    
Line 340... Line 340...
340
    private function getIdsMotsClesImage($id_image) {
340
    private function getIdsMotsClesImage($id_image) {
341
    
341
    
342
    	$requete_selection_mots_cles = 'SELECT DISTINCT id_mot_cle_image '.
342
    	$requete_selection_mots_cles = 'SELECT DISTINCT id_mot_cle '.
Line 343... Line 343...
343
    									   'FROM cel_images_mots_cles '.
343
    									   'FROM cel_mots_cles_images_liaison '.
344
    									   'WHERE id_image = '.$id_image;					   
344
    									   'WHERE id_element_lie = '.$id_image;					   
Line 345... Line 345...
345
    
345