Quick Search Engine

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
icesolid
Forum Regular
Posts: 502
Joined: Mon May 06, 2002 9:36 pm
Location: Buffalo, NY

Quick Search Engine

Post 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.
User avatar
phice
Moderator
Posts: 1416
Joined: Sat Apr 20, 2002 3:14 pm
Location: Dallas, TX
Contact:

Post 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.
Image Image
User avatar
fatal
Forum Contributor
Posts: 118
Joined: Sat Apr 20, 2002 10:47 am
Location: East Coast

Post by fatal »

You could open the file, put it into an array, then search every line...
Post Reply