EvilZone

Programming and Scripting => Web Oriented Coding => Topic started by: @rjun on May 09, 2015, 08:11:39 AM

Title: Search Engine Query (Shifted from Programming Newbies)
Post by: @rjun on May 09, 2015, 08:11:39 AM
Hello everyone!

I've created a database(say tv_shows) with columns(name,path). I want to create a search page for it in php. I am stuck here.
I have already gone through mysql-fulltext search, elasticsearch. But since many shows have same name but only differ at end like S01E12, S01E19,etc. so mysql where condition is something vague for it. Also fulltext search renders numerous results.

Help Me Guys!
Title: Re: Search Engine Query (Shifted from Programming Newbies)
Post by: HTH on May 09, 2015, 10:29:54 PM
Let's learn to google!

"Oh, I want to find a column that contains a certain string..."
*Googles: SQL Query contains string*
*Opens first link*
"Oh I use the LIKE Specifier with % as a wildcard? Cool!"

Title: Re: Search Engine Query (Shifted from Programming Newbies)
Post by: @rjun on May 11, 2015, 07:12:41 PM
i have also used "like" with "%" in it but sir it proves to be futile because:
Let's assume i enter "The big bang theory season 1 episode 12",
and name in database is like the "big bang theory S01E12", so wouldn't  'like' with "%" statement would be futile here?
I also thought about using regex but since there are many other ways of input i am stuck.

Can you provide me some insight how evilzone searches?
Just a request, i would accept a "no".
Thanks
Title: Re: Search Engine Query (Shifted from Programming Newbies)
Post by: @rjun on May 11, 2015, 07:18:33 PM
Sorry for double posting but thanks HTH. I update my name column and added spaces in between and changed "S01E12" to "season 1 episode 12" and then used "like" with wildcard("%") and it is now working.
Sorry for being silly. But i appreciate your concern. Thanks! ;D +1