The SitePoint Forums have moved.

You can now find them here.
This forum is now closed to new posts, but you can browse existing content.
You can find out more information about the move and how to open a new account (if necessary) here.
If you get stuck you can get support by emailing forums@sitepoint.com

If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

anyone know a function (built-in) in PHP to search a mySQL table for a word or phrase? I know this bulletin board has a search function but how can I program this and make somekind of ranking for the results?

for example the words: 'but', 'and', 'in' etc. are almost in every tip of the day. I know, one should search for such words, but can I somehow make the search more precise? When I entered a space (spacebar), all tips were shown which I hope to prevent.

People will not be searching for "and" or "the" they'll be searching for more complicated words or phrases. If you type in "The" in lycos and you'll get a quarter of a billion results. The only way other search engines get around this is by simply denying the ability to search by such common single words.

As for the space, you can trim the search input and then do a check and see if it contains anything, if it does not don't let them search.

If you want them to be able to search for:

"White House" +carter -nixon

Then you're going to have to take the search input, parse it and break it into different variables, and then reconstruct your search statement.

I wrote one a while back, that checks for the existence of 'and' or 'or' in the serach string then builds the query accordingly while omitting those two words from the search. if you would like a copy of the code just email me at freddy@bereminded.com and I would be happy to give you a copy.

Please don't PM me with questions.
Use the forums, that is what they are here for.