select concat('<a href=./circ.php?categ=visu_ex&form_cb_expl=',expl_cb,'>',expl_cb,'</a>') as "Code-barre",expl_cote as Cote, concat(if(notices_m.notice_id is not null,concat('<a href=./catalog.php?categ=isbd&id=',notices_m.notice_id,'>'),concat('<a href=./catalog.php?categ=serials&sub=bulletinage&action=view&bul_id=',bulletin_id,'>')),ifnull(notices_m.tit1,notices_s.tit1),' ',ifnull(bulletin_numero,''),' ',ifnull(mention_date,''),'</a>') as Titre, section_libelle as Section, location_libelle as Localisation, concat('<a href=./circ.php?categ=pret&form_cb=',empr_cb,'>',empr_nom, ', ',empr_prenom,'</a>') as Emprunteur, date_format(pret_date,"%d-%m-%Y") as Sortie, date_format(pret_retour,"%d-%m-%Y") as Retour FROM (((exemplaires LEFT JOIN notices AS notices_m ON expl_notice = notices_m.notice_id ) LEFT JOIN bulletins ON expl_bulletin = bulletins.bulletin_id) LEFT JOIN notices AS notices_s ON bulletin_notice = notices_s.notice_id) left join docs_section on expl_section=idsection left join docs_location on expl_location=idlocation left join pret on expl_id=pret_idexpl left join empr on pret_idempr=id_empr where expl_location in (!!choixloca!!) and expl_section in (!!choixsection!!) and id_empr is not null order by 6 ASC