dev  

Mysql Like statement - blank spaces

Joseph Piron
Thu, 13 Aug 2009 03:19:05 -0700

Dear all,

I'm trying to use the like statement of mysql to search for text in my table
but I have a problem.
Indeed, here's my statement:

        <select id="searchSpecs" resultMap="Spec">
            select * from specs
            where (
            SpecDownload_Data_Id_FactoryCode like '%#value#%' or
            SpecDownload_Data_Id_ProgramCode like '%#value#%')
        </select>

But according to the logs, this is interpreted as :    like '% param0 %'
with extra blanks... so the query is unsuccessful.

Am I doing sthg wrong ?

Thanks a lot for your answers.
  • Mysql Like statement - blank spaces Joseph Piron