I make such a request

SELECT `fl_serial`.`id`, `fl_serial`.`name_serial`, `fl_serial`.`slug_serial`, `fl_serial`.`description_serial`, `fl_serial`.`nesting`, `fl_serial`.`year`, `fl_serial`.`country_title`, `fl_film`.`id`, `fl_film`.`name_film`, `fl_film`.`slug_film`, `fl_film`.`description_film`, `fl_film`.`nesting`, `fl_film`.`year`, `fl_film`.`country_title`, `fl_mfilm`.`id`, `fl_mfilm`.`name_mfilm`, `fl_mfilm`.`slug_mfilm`, `fl_mfilm`.`description_mfilm`, `fl_mfilm`.`nesting`, `fl_mfilm`.`year`, `fl_mfilm`.`country_title`, `fl_cat_serial`.`id`, COALESCE(`fl_serial`.`id`, `fl_film`.`id`, `fl_mfilm`.`id`) AS `ids`, COALESCE(`fl_serial`.`name_serial`, `fl_film`.`name_film`, `fl_mfilm`.`name_mfilm`) AS `name`, COALESCE(`fl_serial`.`slug_serial`, `fl_film`.`slug_film`, `fl_mfilm`.`slug_mfilm`) AS `slug`, COALESCE(`fl_serial`.`description_serial`, `fl_film`.`description_film`, `fl_mfilm`.`description_mfilm`) AS `description`, COALESCE(`fl_serial`.`nesting`, `fl_film`.`nesting`, `fl_mfilm`.`nesting`) AS `nesting`, COALESCE(`fl_serial`.`year`, `fl_film`.`year`, `fl_mfilm`.`year`) AS `years`, COALESCE(`fl_serial`.`country_title`, `fl_film`.`country_title`, `fl_mfilm`.`country_title`) AS `country_title` FROM `fl_cat_serial` LEFT JOIN `fl_serial` ON fl_cat_serial.id_serial = fl_serial.id LEFT JOIN `fl_film` ON fl_cat_serial.id_film = fl_film.id LEFT JOIN `fl_mfilm` ON fl_cat_serial.id_mfilm = fl_mfilm.id WHERE `fl_cat_serial`.`id_cat`=12 ORDER BY `ids` DESC LIMIT 60 

I get this answer

 1617 Тренировочный день (сериал) serial-Trenirovocnyj-den-- serial 2016 США NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 8189 1617 Тренировочный день (сериал) serial-Trenirovocnyj-den-- serial 2016 США 1617 Тренировочный день (сериал) serial-Trenirovocnyj-den-- serial 2016 США NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 8196 1617 Тренировочный день (сериал) serial-Trenirovocnyj-den-- serial 2016 США 1598 Улицы разбитых фонарей (сериал) serial-Ulicy-razbityh-fonarej- serial 1997 Россия NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7870 1598 Улицы разбитых фонарей (сериал) serial-Ulicy-razbityh-fonarej- serial 1997 Россия 1588 19-2 (сериал) serial-19-2 serial 2014 Канада NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7787 1588 19-2 (сериал) serial-19-2 serial 2014 Канада 1588 19-2 (сериал) serial-19-2 serial 2014 Канада NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7790 1588 19-2 (сериал) serial-19-2 serial 2014 Канада 

Well, then such a type why not tell me?

  • one
    You could not make a query line by line, otherwise trying to guess where the error in a line of 1000+ characters is not very interesting. - Smithson
  • four
    I do not see duplicates, the eighth field from the end of the records is different. then you have two entries in the query from the table from which this field is. - Mike
  • @Smithson changed already - Sergalas
  • @Mike yes, why does it occur? - Sergalas
  • Well, if you re-paste the tables in one of which there is one record, and in the second two records, then the output will obviously be two, the query should show all possible results. if you need only one of the records in the table, then you need to decide which one and based on this query - Mike

0