0

i have an application known as Teampass which has a nested folder structure - I'm trying to export the database to migrate it however the application doesnt actaully expose what the folder structure is which is (i need it for the new application.

I have access to the main database which has a list of all folders with an id,parent_id,Name structure.

e.g

+-----+-----------+--------------------------------+
| id  | parent_id | title                          |
+-----+-----------+--------------------------------+
|   2 |         0 | Servers                        |
|   3 |         0 | Services                       |
|   4 |         3 | local                          |
|   5 |         4 | Databases                      |
|   6 |         4 | Radius                         |
|   7 |         4 | LOM                            |
|   8 |         4 | Services                       |
|   9 |         2 | London                         |
|  10 |         2 | Manchester                     |
|  11 |         2 | Miami                          |
|  12 |         8 | Mysql Replication              |
|  13 |         2 | Scotland                       |

my question is -whatst he most appropriate query to run in order to print it so that i get an output similar to the below so i can import it into other applications cleanly

+-----+-------------------------------------------+
| id  | title                                     |
+-----+-------------------------------------------+
|   2 | Servers                                   |
|   3 | Services                                  |
|   4 | Services/local                            |
|   5 | Services/local/Databases                  |
|   6 | Services/local/Radius                     |
|   7 | Services/local/LOM                        |
|   8 | Services/local/Services                   |
|   9 | Servers/London                            |
|  10 | Servers/Manchester                        |
|  11 | Servers/Miami                             |
|  12 | Services/local/Services/Mysql Replication |
|  13 | Servers/Scotland                          |
Shadow
  • 33,525
  • 10
  • 51
  • 64

0 Answers0