How can you implement searching "engine" in your website / webapp?
Suppose you have some items, news, occasions, and so forth, all saved in database in various tables.
You've free text hardcoded inside website in static pages, or at best you've them as gettext files.
You need to have the ability to list pages that consists of a few of the query terms asked for.
Personally, i create another table (fulltext with mysql) that consists of url and items in the page, after which i actually do the fulltext explore that table and report results.
This table is periodically filled with a script that reads the db and place the information.
Exist better techniques to implement a "simple" search?
Well "simple" is subjective. Your method of search won't scale and definitely not suitable for complex queries (tihnk boolean searches, or range queries etc.)
My recommendation is always to denormalize your computer data right into a flat structure and write it to Apache Solr. It provides a Peaceful interface for integrating into PHP or whatever platform you want. It provides faceting, caching, a classy query language etc.