Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CREATE OR REPLACE ALGORITHM=UNDEFINED DEFINER=`root`@`%` SQL SECURITY DEFINER VIEW `vw_books_data` AS select `notices`.`notice_id` AS `idlibro`,(select ifnull(group_concat(`authors`.`author_name` separator ', '),'') AS `IFNULL(group_concat(authors.author_name separator ', '), '')` from (`responsability` join `authors` on((`responsability`.`responsability_author` = `authors`.`author_id`))) where (`responsability`.`responsability_notice` = `idlibro`)) AS `autor`,`notices`.`tit1` AS `titulo`,`notices`.`year` AS `anio`,`notices`.`mention_edition` AS `edicion`,`notices`.`thumbnail_url` AS `imagen`,(select count(`exemplaires`.`expl_id`) AS `autor` from `exemplaires` where (`exemplaires`.`expl_notice` = `idlibro`)) AS `cant_ejemplares`,(select ifnull(group_concat(`publishers`.`ed_name` separator ', '),'') AS `IFNULL(group_concat(publishers.ed_name separator ', '), '')` from `publishers` where (`publishers`.`ed_id` = `notices`.`ed1_id`)) AS `editorial`,(select ifnull(group_concat(`docs_location`.`location_libelle` separator ', '),'') AS `IFNULL(group_concat(docs_location.location_libelle separator ', '),"")` from (`docs_location` join `exemplaires` on((`docs_location`.`idlocation` = `exemplaires`.`expl_location`))) where (`exemplaires`.`expl_notice` = `idlibro`)) AS `seccion` from `notices` order by `notices`.`tit1`
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement