hi!
here is a simple search engine I use in PHP/MySQL. let's search for a user name.
table user: id, first_name, last_name, address, country,...
here is the SQL query to SELECT the proper users from a $search string:
$search = "martin";
$resUser = mysql_query ("SELECT * FROM user WHERE first_name LIKE '%$search%' OR last_name LIKE '%$search%'");
LIKE means that the follow WHERE parameter is a regular expression
% stands for anything, that's why we use it both at the beginning and at the end of the string
Hope it helps!
JM