Here is my problem. For example I have a table Products that contains a field, Name:
Products
ID | Name | ..
1 | \"USB Key 10Go\"
2 | \"I
You could try storing the metaphone of each word concatenated with hyphens. EG stored_metaphone field could contain something like '-AKTRF-SPLS-'. Then build a query like this:
$where = '(';
$search_sql = array();
$search_terms = explode(' ',$search);
foreach ($search_terms as $term) {
$search_sql[] = "`stored_metaphone` LIKE '%-".metaphone($term)."-%'";
}
$where .= implode(' OR ',$search_sql);
$where .= ')';
NB this is only the WHERE part of the query.
As far as I know metaphone only works with English. The above sql is working rather well on a number of sites.