Subversion Repositories eFlore/Applications.del

Compare Revisions

Ignore whitespace Rev 1703 → Rev 1700

/trunk/services/modules/0.1/plantnet/Changements.php
124,22 → 124,19
 
'GROUP_CONCAT(del_image_vote.valeur) as votes, GROUP_CONCAT(DISTINCT tag) as tags, '.
 
'GREATEST('.
'IFNULL(vdi.date_creation, \''.$this->date_defaut.'\'), '.
'IFNULL(vdi.date_modification, \''.$this->date_defaut.'\'), '.
'IFNULL(MAX(del_image_tag.date), \''.$this->date_defaut.'\'), '.
'IFNULL(MAX(del_image_tag.date_modification), \''.$this->date_defaut.'\'), '.
'IFNULL(MAX(del_image_vote.date), \''.$this->date_defaut.'\'), '.
'IFNULL(MAX(del_commentaire.date), \''.$this->date_defaut.'\'), '.
'IFNULL(MAX(del_commentaire_vote.date), \''.$this->date_defaut.'\')) as modif_date '.
'GREATEST(vdi.date_creation, vdi.date_modification, MAX(del_image_tag.date), '.
'MAX(del_image_tag.date_modification), MAX(del_image_vote.date), '.
'IFNULL(MAX(del_commentaire.date),0), IFNULL(MAX(del_commentaire_vote.date),0)) as modif_date '.
 
'from v_del_image as vdi '.
 
'left join del_image_vote on del_image_vote.ce_image=id_image and del_image_vote.ce_protocole=3 '.
'left join del_image_tag on del_image_tag.ce_image=id_image and del_image_tag.actif=1 '.
'left join del_image_vote on del_image_vote.ce_image=id_image '.
'left join del_image_tag on del_image_tag.ce_image=id_image '.
'left join del_commentaire on del_commentaire.ce_observation=id_observation '.
'left join del_commentaire_vote on del_commentaire_vote.ce_proposition=del_commentaire.id_commentaire '.
 
'where ce_protocole=3 and actif=1 '.
 
'group by id_image, id_observation '.
 
'having MAX(vdi.date_creation) >= '.$date_debut.' or '.