I have managed to resolve this:-

select *
from companies 
where CompanyNameSoundex like concat('%', SOUNDEX('services'), '%'); 

-----Original Message-----
From: php_mysql@yahoogroups.com [mailto:php_my...@yahoogroups.com] On
Behalf Of Charlie Markwick
Sent: 25 January 2009 19:19
To: php_mysql@yahoogroups.com
Subject: [php_mysql] Problem using LIKE in MySQL

In a table a field, CompanyNameSoundex, stores Soundex values in the
form:-

S323|S612|S400|S136

I want to do a select based on that field in the form:-

Select * from companies where CompanyNameSoundex like "%S612%";

Except I want to use the word rather than the Soundex value, something
like:-

Select * from companies where CompanyNameSoundex like
"%SOUNDEX('services')%";

Obviously this doesn't work but is there a way I can pass the Soundex
value to the like search?

Charlie

Reply via email to