php - mysql like does not give any results even though there are records in the table -


select id table title  '%dir clinical - acting clinical director%'     or title  '%dir clinical - assistant director of nursing%'  

mysql not give results above query,even though there records in table, may due hyphen in between. when try remove text before hyphen , query remaining text, getting wrong results

could 1 of explain issue, getting 0 results there hyphen in between text while applying

in mysql have 2 wilcards, % match multiple characters , _ match 1 character. assuming hyphen problem, can try:

 '%dir clinical _ acting clinical director%' 

that allow character in hyphen spot, , solve problem of unicode hyphens vs regular or similar issues.


Comments

Popular posts from this blog

searchKeyword not working in AngularJS filter -

sequelize.js - Sequelize: sort by enum cases -

user interface - how to replace an ongoing process of image capture from another process call over the same ImageLabel in python's GUI TKinter -