select distinct users.id_user, users.login, ms_vendeurs.module_actif, collections.id_collection, collections.nom_collection, collections.is_download, collections.is_notations, collections.type_album, collections.description, collections.nb_visites_album, collections.desc_import, sum(is_accueil * medias.id_media) as def, count(medias.id_media) as S from users left join ms_vendeurs on ms_vendeurs.id_user=users.id_user inner join collections on collections.id_user=users.id_user inner join medias on medias.id_collection=collections.id_collection where collections.type_album='public' AND users.cle_validation='' AND id_thematique=21 group by users.id_user, users.login, collections.id_collection, collections.nom_collection, collections.is_download, collections.type_album, collections.description, collections.nb_visites_album LIMIT 0, 2
Got error 28 from storage engine