Вот дамп списка валют
CREATE TABLE IF NOT EXISTS `bit_gateways` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(255) DEFAULT NULL,
`currency` varchar(255) DEFAULT NULL,
`reserve` varchar(255) DEFAULT NULL,
`min_amount` varchar(255) DEFAULT NULL,
`max_amount` varchar(255) DEFAULT NULL,
`exchange_type` int(11) DEFAULT NULL,
`include_fee` int(11) DEFAULT NULL,
`extra_fee` varchar(255) DEFAULT NULL,
`fee` varchar(255) DEFAULT NULL,
`allow_send` int(11) DEFAULT NULL,
`allow_receive` int(11) DEFAULT NULL,
`default_send` int(11) DEFAULT NULL,
`default_receive` int(11) DEFAULT NULL,
`allow_payouts` int(11) DEFAULT NULL,
`a_field_1` varchar(255) DEFAULT NULL,
`a_field_2` varchar(255) DEFAULT NULL,
`a_field_3` varchar(255) DEFAULT NULL,
`a_field_4` varchar(255) DEFAULT NULL,
`a_field_5` varchar(255) DEFAULT NULL,
`a_field_6` varchar(255) DEFAULT NULL,
`a_field_7` varchar(255) DEFAULT NULL,
`a_field_8` varchar(255) DEFAULT NULL,
`a_field_9` varchar(255) DEFAULT NULL,
`a_field_10` varchar(255) DEFAULT NULL,
`status` int(11) DEFAULT NULL,
`external_gateway` int(11) NOT NULL DEFAULT '0',
`external_icon` text,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=69 ;
INSERT INTO `bit_gateways` (`id`, `name`, `currency`, `reserve`, `min_amount`, `max_amount`, `exchange_type`, `include_fee`, `extra_fee`, `fee`, `allow_send`, `allow_receive`, `default_send`, `default_receive`, `allow_payouts`, `a_field_1`, `a_field_2`, `a_field_3`, `a_field_4`, `a_field_5`, `a_field_6`, `a_field_7`, `a_field_8`, `a_field_9`, `a_field_10`, `status`, `external_gateway`, `external_icon`) VALUES
(58, 'Perfect Money', 'USD', '955.04664', '20', '3000', 2, 0, '', '6', 1, 1, 0, 0, NULL, 'U 26 1667', '', '', '', '', NULL, NULL, NULL, NULL, NULL, 1, 0, NULL),
(59, 'Halyk Bank', 'KZT', '800001', '500', '300000', 3, 0, '', '6', 1, 1, 0, 0, NULL, '4405 6376 4588 8766', '', '', '', '', '', '', '', '', '', 1, 1, 'uploads/1576606355_icon.jpg'),
(61, 'Яндекс Деньги', 'RUB', '100001', '200', '100000', 3, 0, '', '6', 1, 1, 0, 0, NULL, '4186914099', '', '', '', '', '', '', '', '', '', 1, 1, 'uploads/1576606678_icon.jpg'),
(62, 'Bitcoin cash', 'BCH', '301', '0.06', '800', 3, 0, '', '6', 1, 1, 0, 0, NULL, '17DodgBoZSh5hVXw2QWdV4ooSTrP', '', '', '', '', '', '', '', '', '', 1, 1, 'uploads/1576606835_icon.jpg'),
(64, 'Platin Coin', 'PLC', '49686.5686479', '10', '1000', 3, 0, '', '6', 1, 1, 0, 0, NULL, 'P4uTrvHbdRimvdwMLSBEncRyVDoyb1', '', '', '', '', '', '', '', '', '', 1, 1, 'uploads/1576607184_icon.jpg'),
(67, 'Tether ERC20', 'USDT', '500001', '10', '1000', 3, 0, '', '5', 1, 1, 0, 0, NULL, '0x8cadb36156b75537bb47f7073552f14efa7fb74b', '', '', '', '', '', '', '', '', '', 1, 1, 'uploads/1577219820_icon.jpg'),
(51, 'Forte Bank', 'KZT', '990000', '200', '1000000', 3, 0, '', '4', 1, 1, 0, 0, NULL, '4342 4386 6733 4847', '', '', '', '', '', '', '', '', '', 1, 1, 'uploads/1576604426_icon.png'),
(52, 'Сбербанк', 'RUB', '936884.713629', '1000', '100000', 3, 0, '', '3', 1, 1, 0, 0, NULL, '4274270014807473', '', '', '', '', '', '', '', '', '', 1, 1, 'uploads/1576604612_icon.png'),
(53, 'Тинькофф', 'RUB', '1000000', '150', '500000', 3, 0, '', '4', 1, 1, 0, 0, NULL, '7836 9137 4523 1056', '', '', '', '', '', '', '', '', '', 1, 1, 'uploads/1576604985_icon.jpg'),
(54, 'QIWI', 'KZT', '100000000', '300', '300000', 3, 0, '', '10', 1, 1, 0, 0, NULL, '+7707777176', '', '', '', '', NULL, NULL, NULL, NULL, NULL, 1, 0, NULL),
(55, 'QIWI', 'RUB', '996880.67403', '200', '100000', 3, 0, '', '5', 1, 1, 0, 0, NULL, '+7707777176', '', '', '', '', NULL, NULL, NULL, NULL, NULL, 1, 0, NULL),
(56, 'AdvCash', 'USD', '1416.10129789', '20', '5000', 2, 1, '', '5', 1, 1, 0, 0, NULL, 'U 85 8004 1059', '', '', '', '', NULL, NULL, NULL, NULL, NULL, 1, 0, NULL),
(57, 'AdvCash', 'EUR', '19829.834', '2', '3000', 2, 0, '', '6', 1, 1, 0, 0, NULL, 'Е 61 6781 6021', '', '', '', '', NULL, NULL, NULL, NULL, NULL, 1, 0, NULL),
(65, 'Waves', 'WAVES', '20001', '1', '1000', 3, 0, '', '6', 1, 1, 0, 0, NULL, '3PGzf6aLPTr1vgYSyrragjMkR2gqPWVAN5M', '', '', '', '', '', '', '', '', '', 1, 1, 'uploads/1576856142_icon.png'),
(47, 'Bitcoin', 'BTC', '2', '0.0002', '2', 3, 0, '', '6', 1, 1, 0, 0, NULL, '17DoMMVFetdgBoZSh5hVXw2QWdV4ooSTrP', '', '', '', '', NULL, NULL, NULL, NULL, NULL, 1, 0, NULL),
(48, 'Ethereum', 'ETH', '54', '0.05', '200', 3, 0, '', '6', 1, 1, 0, 0, NULL, '0x8cadb36156b75537bb47f7073552f14efa7fb74b', '', '', '', '', NULL, NULL, NULL, NULL, NULL, 1, 0, NULL),
(68, 'Visa /Master card', 'USD', '999897.51528', '10', '10000', 3, 0, '', '5', 1, 1, 0, 0, NULL, '7890637657881978', '', '', '', '', '', '', '', '', '', 1, 1, 'uploads/1577219879_icon.jpg'),
(50, 'Kaspi Gold', 'KZT', '946601.204244', '200', '1000000', 3, 0, '5', '4', 1, 1, 0, 0, NULL, '7845 4971 3798 4756', '', '', '', '', '', '', '', '', '', 1, 1, 'uploads/1576604218_icon.jpg');
Вот дамп запрещеных обменов
CREATE TABLE IF NOT EXISTS `bit_prohibition` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`gateway_from` int(11) DEFAULT NULL,
`gateway_to` int(11) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=181 ;
INSERT INTO `bit_prohibition` (`id`, `gateway_from`, `gateway_to`) VALUES
(59, 50, 52),
(60, 50, 53),
(61, 50, 54),
(62, 50, 55),
(63, 50, 57),
(64, 50, 58),
(179, 47, 54),
(66, 47, 61),
(67, 47, 59),
(68, 51, 50),
(69, 51, 52),
(70, 51, 53),
(71, 53, 54),
(72, 51, 55),
(73, 51, 57),
(74, 51, 58),
(178, 56, 55),
(76, 51, 61),
(77, 52, 50),
(78, 52, 51),
(79, 52, 54),
(80, 52, 53),
(81, 52, 55),
(82, 52, 57),
(83, 52, 59),
(176, 64, 54),
(85, 52, 61),
(86, 53, 50),
(87, 53, 51),
(88, 53, 55),
(89, 53, 57),
(90, 53, 58),
(91, 53, 59),
(175, 64, 55),
(93, 54, 50),
(94, 54, 51),
(95, 54, 52),
(96, 54, 53),
(97, 54, 55),
(98, 54, 57),
(99, 54, 58),
(100, 54, 59),
(177, 55, 64),
(102, 55, 50),
(103, 47, 47),
(104, 55, 51),
(105, 55, 52),
(106, 55, 53),
(107, 55, 54),
(108, 55, 56),
(109, 55, 57),
(110, 55, 58),
(111, 55, 59),
(113, 55, 61),
(114, 58, 50),
(115, 58, 51),
(116, 58, 52),
(117, 58, 53),
(118, 58, 54),
(119, 58, 55),
(120, 58, 59),
(174, 50, 59),
(122, 58, 61),
(123, 59, 53),
(124, 59, 50),
(125, 59, 52),
(127, 59, 61),
(128, 61, 50),
(135, 61, 59),
(138, 61, 52),
(139, 61, 51),
(140, 61, 53),
(141, 61, 54),
(142, 61, 55),
(143, 47, 64),
(144, 47, 65),
(145, 47, 48),
(146, 48, 47),
(147, 48, 62),
(148, 48, 64),
(149, 48, 65),
(150, 62, 47),
(151, 62, 48),
(152, 62, 64),
(153, 62, 65),
(154, 64, 47),
(155, 64, 48),
(156, 64, 62),
(157, 64, 65),
(158, 65, 47),
(159, 65, 48),
(160, 65, 62),
(161, 65, 64),
(162, 48, 48),
(163, 50, 61),
(164, 51, 59),
(165, 53, 52),
(166, 54, 56),
(167, 54, 61),
(168, 54, 64),
(169, 54, 65),
(180, 47, 55),
(171, 55, 65),
(172, 59, 55),
(173, 64, 67);
И как же я буду использовать JOIN исходя из этих таблиц?