Subversion Repositories eFlore/Applications.del

Rev

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

Rev 1698 Rev 1702
Line 122... Line 122...
122
          $requete_sql = 
122
          $requete_sql = 
123
            'select SQL_CALC_FOUND_ROWS vdi.id_observation, vdi.id_image, '.
123
            'select SQL_CALC_FOUND_ROWS vdi.id_observation, vdi.id_image, '.
Line 124... Line 124...
124
 
124
 
Line -... Line 125...
-
 
125
            'GROUP_CONCAT(del_image_vote.valeur) as votes, GROUP_CONCAT(DISTINCT tag) as tags, '.
125
            'GROUP_CONCAT(del_image_vote.valeur) as votes, GROUP_CONCAT(DISTINCT tag) as tags, '.
126
 
-
 
127
            'GREATEST('.
-
 
128
            'IFNULL(vdi.date_creation, \''.$this->date_defaut.'\'), '.
126
 
129
            'IFNULL(vdi.date_modification, \''.$this->date_defaut.'\'), '.
-
 
130
            'IFNULL(MAX(del_image_tag.date), \''.$this->date_defaut.'\'), '.
-
 
131
            'IFNULL(MAX(del_image_tag.date_modification), \''.$this->date_defaut.'\'), '.
127
            'GREATEST(vdi.date_creation, vdi.date_modification, MAX(del_image_tag.date), '.
132
            'IFNULL(MAX(del_image_vote.date), \''.$this->date_defaut.'\'), '.
Line 128... Line 133...
128
            'MAX(del_image_tag.date_modification), MAX(del_image_vote.date), '.
133
            'IFNULL(MAX(del_commentaire.date), \''.$this->date_defaut.'\'), '.
Line 129... Line 134...
129
            'IFNULL(MAX(del_commentaire.date),0), IFNULL(MAX(del_commentaire_vote.date),0)) as modif_date '.
134
            'IFNULL(MAX(del_commentaire_vote.date), \''.$this->date_defaut.'\')) as modif_date '.
130
 
135
 
131
            'from v_del_image as vdi '.
136
            'from v_del_image as vdi '.
132
 
137
 
Line 133... Line -...
133
            'left join del_image_vote on del_image_vote.ce_image=id_image '.
-
 
134
            'left join del_image_tag on del_image_tag.ce_image=id_image '.
-
 
135
            'left join del_commentaire on del_commentaire.ce_observation=id_observation '.
138
            'left join del_image_vote on del_image_vote.ce_image=id_image and del_image_vote.ce_protocole=3 '.
Line 136... Line 139...
136
            'left join del_commentaire_vote on del_commentaire_vote.ce_proposition=del_commentaire.id_commentaire '.
139
            'left join del_image_tag on del_image_tag.ce_image=id_image and del_image_tag.actif=1 '.
137
 
140
            'left join del_commentaire on del_commentaire.ce_observation=id_observation '.
138
            'where ce_protocole=3 and actif=1 '.
141
            'left join del_commentaire_vote on del_commentaire_vote.ce_proposition=del_commentaire.id_commentaire '.