MySQL LIKE matching whole numbers only -


i trying records database have number in vertical pipe separated value.

i have query this:

select * level_3        date_end = -6   ,      ccode = 'gb'  , (      responsible '%5%' or      accountable '%5%' or      consulted '%5%' or      informed '%5%'     ) 

and here results:

date_end    ccode    responsible    accountable    consulted    informed -6          gb       |6|            |6|            |8|9|15|     |8| -6          gb       |6|5|          |6|            |8|          |16| 

however matching 15 like %5% want match exact number. how can go doing this?

try query:

select * level_3        date_end = -6   ,      ccode = 'gb'  , (      responsible '%|5|%' or      accountable '%|5|%' or      consulted '%|5|%' or      informed '%|5|%'     ) 

Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -