There is an old (1) and a new (2) database. I transfer the data to mezhu two tables. The question is how to do this if the main table pulls other FK tables from (1) behind it. Now I have one SELECT for a table in a DB (1), and I do INSERT 's into tables from a DB (2). To transfer data from other (*) tables, you need to do another SELECT ? Now the script structure is as follows:
//подключение к (1) SELECT из таблицы БД(1) //подключение к (2) while($row = $result->fetch_assoc()) {... $data=$row['data']; ...} INSERT в таблицы БД(2) It is necessary to make one more SELECT for the related tables from (1) and to push the data into the same $result ?