Page 1 of 1

Quick Search Engine

Posted: Mon May 06, 2002 9:36 pm
by icesolid
I want to make a quick search of all of the PHP files and MySQL database information on my site. I really have no clue where to start, anyone that could supply me with a hint or clue?

I know PHP and PHP scripting with MySQL fairly well, but on this search engine I just can not seem to figure it out how to make it work.

Also any links or resource sites that you know of, that would help to.

Posted: Mon May 06, 2002 11:03 pm
by phice
instead of doing "SELECT * FROM table WHERE col1 = '$var1'", you would use "SELECT * FROM table WHERE col1 LIKE '%$var1%'", and $var1 = what you searched for. This is only good with MySQL tables, I'm not quite sure how to search through the files.

Posted: Tue May 07, 2002 11:15 am
by fatal
You could open the file, put it into an array, then search every line...