Author Topic: Search Engine Query (Shifted from Programming Newbies)  (Read 985 times)

0 Members and 1 Guest are viewing this topic.

Offline @rjun

  • Serf
  • *
  • Posts: 39
  • Cookies: -10
    • View Profile
Search Engine Query (Shifted from Programming Newbies)
« 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!
« Last Edit: May 09, 2015, 08:12:09 am by @rjun »

Offline HTH

  • Official EZ Slut
  • Administrator
  • Knight
  • *
  • Posts: 395
  • Cookies: 158
  • EZ Titan
    • View Profile
Re: Search Engine Query (Shifted from Programming Newbies)
« Reply #1 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!"

<ande> HTH is love, HTH is life
<TurboBorland> hth is the only person on this server I can say would successfully spitefuck peoples women

Offline @rjun

  • Serf
  • *
  • Posts: 39
  • Cookies: -10
    • View Profile
Re: Search Engine Query (Shifted from Programming Newbies)
« Reply #2 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

Offline @rjun

  • Serf
  • *
  • Posts: 39
  • Cookies: -10
    • View Profile
Re: Search Engine Query (Shifted from Programming Newbies)
« Reply #3 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