I'm trying to make a search engine on my website that will search a mysql database.
Now I already have the database completed. It contains the headers {Name}{Ext}{Path}{Date}{Size}
As you can guess it's a file search engine. The problem I'm having is with displaying the information.
I want to make the results display in the format of a collapsible list.
Code: Select all
//servername/Movies/100 Girls/100 Girls (fullscreen) (DVD Rip - DivX).avi : 724. MB
//servername/Movies/100 Girls/Thumbs.db : 0.00 MB
//servername/Movies/40 year old virgin/dmd-40yearoldv-cd1.avi : 731. MB
//servername/Movies/40 year old virgin/dmd-40yearoldv-cd2.avi : 731. MB
//servername/Movies/American History X.avi : 953. MB
//servername/Movies/American Pie - Band Camp/American Pie Band Camp (2005) (V).avi : 734. MB
//servername/Movies/American Pie 1/American Pie [DivX].avi : 702. MB
//servername/Movies/American Pie 1/Thumbs.db : 0.00 MBIf the user searched for pie.
I would like the results to just show the word Movies. Then if you clicked on movies, two options would show, American Pie 1 and American Pie - Band Camp. Both of which would be their own collapsible lists containing the files within each subdirectory respectively.
I was originally thinking along the lines of creating a huge mysql table with enough subdirectory cells to hold files within 10 subdirectories but it became messy, so I was think that perhaps there may be some way to do it with just the entire file path and the explode() function. What do you guys think?