Searching in php and mysql

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
pinehead18
Forum Contributor
Posts: 329
Joined: Thu Jul 31, 2003 9:20 pm

Searching in php and mysql

Post by pinehead18 »

Ok, here is my setup. I'm trying to write an advanced search function for my site.

I want it to be able to search the fields and if it sees one of the 4 words in one field or even 4 of the 4 words in the field it will display it as a result.

Do i need to use the life feature or what?

Please help.

If so any ideas on how to use the like feature or examples in code?

Thanks
Anthony
User avatar
devork
Forum Contributor
Posts: 213
Joined: Fri Aug 08, 2003 6:44 am
Location: p(h) developer's network

Post by devork »

you can use regular expressions on the result set field and make decision
ereg("your RE options",$res[1]);
pinehead18
Forum Contributor
Posts: 329
Joined: Thu Jul 31, 2003 9:20 pm

Post by pinehead18 »

Perhaps you could clearify that for me. Cuase i do not know what you mean.

THank you
Anthony
Post Reply