php - MySQL Return everything if a letter or word is matched? -


this using right now:

select * title title.posttitle '%$search%' 

if searches how make apple pie returns right thing.

if searches make apple pie returns nothing reason.

how can make if letter or word matches returns record?

if posttitle contains $search value produce response. in point of view searching string holding multiple words not best practice. break string words (example using javascript)

var string = "my sample sentence"; var words = str.split(" "); 

and search if contains words

select * title (title.posttitle '%words[0]%') , (title.posttitle '%words[1]%') ...etc 

storing data in 1 format db search (all lowercase or uppercase)


Comments

Popular posts from this blog

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

javascript - Using jquery append to add option values into a select element not working -

javascript - Restarting Supervisor and effect on FlaskSocketIO -