Page 1 of 1

Searching in php and mysql

Posted: Sat Dec 27, 2003 3:21 pm
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

Posted: Sat Dec 27, 2003 3:46 pm
by devork
you can use regular expressions on the result set field and make decision
ereg("your RE options",$res[1]);

Posted: Sat Dec 27, 2003 6:16 pm
by pinehead18
Perhaps you could clearify that for me. Cuase i do not know what you mean.

THank you
Anthony