есть два разных сервера, необходимо сделать запрос к каждому из них и сделать union all с этими двумя запросами, поискав в интернете не нашёл особо информации по этому поводу, когда всё было на одном сервере проблем не возникало, а сейчас неизвестно как можно решить данную проблему Код старого запроса (uni-ugresha_colportal была одной базой, а uni-ugresha_portal второй):
SELECT *
FROM (SELECT time, CONCAT( person.last_name, ' ',SUBSTR(person.name,1,1), '.' ,SUBSTR(person.middle_name,1,1), '.') AS fio, odd, `uni-ugresha_colportal`.person.name AS imya, `uni-ugresha_colportal`.person.middle_name AS fam, `uni-ugresha_colportal`.person.last_name AS otch , `uni-ugresha_colportal`.days.day, `uni-ugresha_colportal`.subject.name AS predmet, `uni-ugresha_colportal`.nedelya.ned, `uni-ugresha_colportal`.groups.name AS groop, `uni-ugresha_colportal`.class.number AS class, `uni-ugresha_colportal`.schedule.id_class, sub_group, `uni-ugresha_colportal`.schedule.day AS den, `uni-ugresha_colportal`.schedule.odd AS chet, `uni-ugresha_colportal`.schedule.id
FROM `uni-ugresha_colportal`.schedule
INNER JOIN `uni-ugresha_colportal`.days ON `uni-ugresha_colportal`.days.id = `uni-ugresha_colportal`.schedule.day
INNER JOIN `uni-ugresha_colportal`.class ON `uni-ugresha_colportal`.class.id = `uni-ugresha_colportal`.schedule.id_class
INNER JOIN `uni-ugresha_colportal`.person ON `uni-ugresha_colportal`.person.id = `uni-ugresha_colportal`.schedule.id_teacher
INNER JOIN `uni-ugresha_colportal`.nedelya ON `uni-ugresha_colportal`.nedelya.id = `uni-ugresha_colportal`.schedule.odd
INNER JOIN `uni-ugresha_colportal`.subject ON `uni-ugresha_colportal`.subject.id = `uni-ugresha_colportal`.schedule.id_subject
INNER JOIN `uni-ugresha_colportal`.groups ON `uni-ugresha_colportal`.groups.id = `uni-ugresha_colportal`.schedule.id_group
WHERE `uni-ugresha_colportal`.class.number = '" . $_GET['cab'] . "' AND (".$zapros.")
UNION ALL
SELECT time, CONCAT( person.last_name, ' ',SUBSTR(person.name,1,1), '.' ,SUBSTR(person.middle_name,1,1), '.') AS fio, odd, `uni-ugresha_portal`.person.name AS imya, `uni-ugresha_portal`.person.middle_name AS fam, `uni-ugresha_portal`.person.last_name AS otch , `uni-ugresha_portal`.days.day, `uni-ugresha_portal`.subject.name AS predmet, `uni-ugresha_portal`.nedelya.ned, `uni-ugresha_portal`.groups.name AS groop, `uni-ugresha_portal`.class.number AS class, `uni-ugresha_portal`.schedule.id_class, sub_group, `uni-ugresha_portal`.schedule.day AS den, `uni-ugresha_portal`.schedule.odd AS chet, `uni-ugresha_portal`.schedule.id
FROM `uni-ugresha_portal`.schedule
INNER JOIN `uni-ugresha_portal`.days ON `uni-ugresha_portal`.days.id = `uni-ugresha_portal`.schedule.day
INNER JOIN `uni-ugresha_portal`.class ON `uni-ugresha_portal`.class.id = `uni-ugresha_portal`.schedule.id_class
INNER JOIN `uni-ugresha_portal`.person ON `uni-ugresha_portal`.person.id = `uni-ugresha_portal`.schedule.id_teacher
INNER JOIN `uni-ugresha_portal`.nedelya ON `uni-ugresha_portal`.nedelya.id = `uni-ugresha_portal`.schedule.odd
INNER JOIN `uni-ugresha_portal`.subject ON `uni-ugresha_portal`.subject.id = `uni-ugresha_portal`.schedule.id_subject
INNER JOIN `uni-ugresha_portal`.groups ON `uni-ugresha_portal`.groups.id = `uni-ugresha_portal`.schedule.id_group
WHERE `uni-ugresha_portal`.class.number = '" . $_GET['cab'] . "' AND (".$zapros2.") ) as tt
ORDER BY time ASC,den,odd,sub_group
Айфон мало держит заряд, разбираемся с проблемой вместе с AppLab
Проблема: мне нужно из фрагмента C вернуться на AКогда я это делаю, то фрагмент A инициализируется(все методы жизненого цикла отрабатывают),...
Задание: нужно проверить, содержится ли в первой строке вторая строка и вывести "Содержится" или "Не содержится"Использовать стандартные...