2 messages in com.mysql.lists.mysqlUsing Soundex
FromSent OnAttachments
Debbie Woods22 Aug 2004 22:25 
Chris McKeever22 Aug 2004 22:30 
Subject:Using Soundex
From:Debbie Woods (deb@creativewebfx.com)
Date:08/22/2004 10:25:14 PM
List:com.mysql.lists.mysql

I am building a search feature with Cold Fusion and need to have similar string matches included in the search results. I have a search form field called hsname. I am trying to use the SOUNDEX function in my query like this: SELECT * FROM accounts WHERE SOUNDEX(hsname) = SOUNDEX('#form.hsname#')

If I enter Eisen into the search field, it should return one record if SOUNDEX is working right. However, it doesn't return any records. If I hard code Eisen into the search query like this (instead of the variable):

WHERE SOUNDEX(hsname) = SOUNDEX('Eisen')

SOUNDEX works as it should. Is there a problem with my SQL syntax? Or does it not work with variables?

Thanks