INSERT INTO procs set name='4.8. Liste pour inventaire et bibliographie à partir d\'un panier d\'exemplaires', requete='select expl_cote as Cote, concat(author_name,\', \',author_rejete) as \'Auteur / N° bulletin\', tit1 as \'Titre (document / périodique)\', ed_name as Editeur, CONCAT(\"\'\", expl_cb, \"\'\") as \'Code-Barres\', IF(pret_idexpl = expl_id, \'Sorti\',statut_libelle) as \'Disponibilité\' from notices left join responsability on (responsability_notice=notice_id and responsability_type=0) left join authors on responsability_author=author_id left join publishers on ed_id=ed1_id left join exemplaires on expl_notice=notice_id left join pret on expl_id = pret_idexpl left join docs_statut on expl_statut=idstatut left join caddie_content on object_id=expl_id where caddie_id in (!!caddie!!) union select expl_cote as Cote, concat(\'N° \',bulletin_numero, \' - \', mention_date) as \'N° périod.\',tit1 as Titre, ed_name as Editeur, CONCAT(\"\'\", expl_cb, \"\'\") as \'Code-Barres\', IF(pret_idexpl is not null,\'Sorti\',statut_libelle) as \'Disponibilité\' from exemplaires inner join docs_statut on (expl_statut=idstatut) left join pret on (pret_idexpl=expl_id) inner join bulletins on (expl_bulletin=bulletin_id) inner join notices on (bulletin_notice=notice_id) left join publishers on (ed1_id=ed_id), caddie_content where object_id=expl_id and caddie_id in (!!caddie!!) order by Cote, \'Auteur/N° bulletin\', \'Titre/Nom périodique\'', comment='Tri par cote, avec auteur/n° bulletin, titre/nom revue, éditeur, code-barres et disponibilité', autorisations='1', parameters=' query_list select idcaddie, name from caddie where type=\'EXPL\' order by name yes '