A
A
Andrey Angelovich Stock2018-04-10 15:59:23
MySQL
Andrey Angelovich Stock, 2018-04-10 15:59:23

Select data from two mysql tables?

Hi all! There are two data tables.

INSERT INTO `completed_data` (`id`, `url`, `repetition`, `ton`, `type`, `date`) VALUES
(92, ' https://mtrqlodost.bez/ ', '1', '0', '0', '10.04.2018 09:49:58'),
(93, ' http://mqolodwost.brz/ ', '1', '2', '0', '10.04.2018 09:49:58'),
(94, ' https://otrude.net/employers/29324 ', '1', '2', '0', '10.04.2018 09:49:58'),
(95, ' http://umom.biz/otzyv-na-kurs-bieznees-molodeost/ ', '1', '1', '0', '10.04.2018 09:49:58'),
(96, ' https://www.youtube.com/watch?v=j ', '1', '1', '0', '10.04.2018 09:49:58');

INSERT INTO `data_queries` (`id`, `url`, `task_id`, `search`, `engine_id`, `region_id`, `date`) VALUES
(223, 'https://gid.turtella.ru/reports/', '13165938', 'yandex', '412', '187', '10.04.2018 12:10:09'),
(224, 'https://www.tripadvisor.ru/Attraction_Review, '13165938', 'yandex', '412', '187', '10.04.2018 12:10:09'),
(225, 'https://stepdream.com/reviews?page=2', '13165938', 'yandex', '412', '187', '10.04.2018 12:10:09'),
(226, 'https://meget.tr/novostroyki/1397-zk-tsvetnoy-bulvar/otzivi/', '13165938', 'yandex', '412', '187', '10.04.2018 12:10:09'),
(227, 'https://sovet.kidstaff.com.ua/question', '13165938', 'yandex', '412', '187', '10.04.2018 12:10:09'),
(228, 'http://spasibovsem.ru/responses, '13165938', 'yandex', '412', '187', '10.04.2018 12:10:09');

As you can see, two tables have columns with URLs. I need to create php arrays that will combine all the data for the corresponding URL. that is, if the URL from the first table matches the URL from the second, then assign values ​​from two tables to it. AS? Help me please.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
Lazy @BojackHorseman MySQL, 2018-04-10
@your_uncle

JOIN and its varieties

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question