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
Post a Comment