Jump to content

Recommended Posts

so i'm creating a search page for a website i'm working on and am making a search page.

 

right now i'm just using a like statement. 

SELECT movies_id, movies_name, movies_date, movies_showing, movies_location, movies_free FROM movies WHERE movies.movies_name LIKE "north by northwest"

 

problem is that it doesnt return good enough results.  if the search term is "north" nothing shows up, "north by northwest" has results

 

so i looked into alternative ways to do the search so that it would check each word in the column.. and didnt find great results.  i think this would work

 

$query = "SELECT movies_id, movies_name, movies_date, movies_showing, movies_location, movies_free FROM movies WHERE MATCH (movies_name) AGAINST('".$q."')";

 

buttt i dont think this works with my version of mysql- it requires FULLTEXT type for the column, and i can't select it in phpmyadmin.  according to phpmyadmin i'm running Server version: 3.23.56-max-log (at least i assume this is the mysql version). 

 

any suggestions on how i could create this query? preferably i wouldn't have to modify the database.. i'm just trying to match titles.

 

thanks for any possible help!

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.