$jsonData = file_get_contents('php://input');
$data = json_decode($jsonDdata, true);
Content-Type: application/json
let requestsList = [
{url: 'https://...', data: {...}},
{url: 'https://...', data: {...}}
];
function request(list) {
$.ajax({
url: list[0].url,
type: "GET",
data: list[0].data,
success: function(data) {
//вывод данных
if (list.count > 1) {
request(list.slice(1));
}
},
timeout: 300000
});
}
request(requestList);
SELECT `a`.`name` AS `author_name`, `b`.`name` AS `book_name`
FROM (
SELECT `author_id`, `name`,
ROW_NUMBER() OVER (PARTITION BY `author_id` ORDER BY `id` DESC) AS `row`
FROM `books`
) AS `b`
JOIN `authors` AS `a`
ON `b`.`row` < 6 AND `a`.`id` = `b`.`author_id`
WHERE `a`.`id` IN (список id)
ORDER BY `a`.`name`, `b`.`name`