Hello to everyone,
Currenty I have a php project that uploads files to the server and save some extra information into the database.
My problem is that I want to make a feature that copies a folder structure with files included to a database.
I am trying to copy the folder structure, but the issue is that I cant follow the relationships with the new ids.
The main structure of the table is like this
CREATE TABLE `people_folders` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`folder_id` int(11) NOT NULL COMMENT 'Here is stored the root folder id',
`name` varchar(255) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
CREATE TABLE `people_documents` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`folder_id` int(11) NOT NULL COMMENT 'Here is stored the id of the folder that the file is stored',
`name` varchar(255) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
To be more clear, I am trying to do something that Joomla! do copy menus
https://docs.joomla.org/images/8/81/Help30-colheader-batch-process-articles.png