sqlite - Hierarchical SQL query - SQLLite -


i have structure this:

  • site
    • documentlibrary
      • folder 1
        • file 1
      • folder 2
      • folder 3
        • file 2
        • file 3
    • documentlibrary 2
      • file 6
      • folder 4
        • folder 5
          • folder 6
            • file 5
            • file 6

my tables following:

[website] - websiteid - websitename

[document_library] - libraryid - libraryname - websiteid

[folder] - folderid - foldername - libraryid - parentfolderid

[file] - fileid - filename - libraryid - folderid

my question is...given siteid , documentlibrary id how can retrieve folders of document library structure? files of document library structure?

depending on version can use cte mssql

http://www.sqlite.org/lang_with.html


Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - .htaccess mod_rewrite for dynamic url which has domain names -

Website Login Issue developed in magento -