Forum Moderators: coopster

Message Too Old, No Replies

PHP glob problem

         

andrewsmd

5:24 pm on Nov 17, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I have a form that gets input from our users for a file name search. i.e. c:\some folder\*
Now I parse it so that particular search would return all of the files and folder names in some folder since they entered *. The problem I have is, some of these folders can have 10s of thousands of files. When the search like this get's so large my PHP server just quits working and doesn't return anything. Does anyone have any ideas of how I could work around this. Meaning logic to maybe search for a set number and then return results then search again and return more results? I know that is a broad question but this application is rather large already and I don't know if pasting all of my code would help. Any pseudo code ideas? Thanks,

henry0

6:16 pm on Nov 17, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You could do a full-text search, [dev.mysql.com] look for match()
this will sort the result by relavance result
so you may limit the result shown.

hope this helps

andrewsmd

6:39 pm on Nov 17, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I don't select anything with mysql these are all text files within a folder.