我试图合并两个具有另一个表(group_message_log)的外键的表。但发生错误。
错误:未知表 'group_message_log'
SELECT `message_id`,group_message_log.* FROM `messages_log` AS `log_1` JOIN `group_message_log` AS `gm` ON `message_id` = gm.id WHERE `student_id`='128'
UNION ALL
SELECT `message_id`,group_message_log.* FROM `message_phone_log` AS `log_2` JOIN `group_message_log` AS `gm` ON gm.id = `message_id` WHERE (`phone`='XXX' OR `phone`='XXX')