Jump to content

Using ALTERTABLE and FULLTEXT to search a MySQL Table


suttercain

Recommended Posts

Ho guys,

 

I am running the following:

mysql_query("ALTER TABLE reviews ADD FULLTEXT (title)") or die(mysql_error());
mysql_query("ALTER TABLE reviews ADD FULLTEXT (body)") or die(mysql_error());
$result = mysql_query("SELECT movieId, title, MATCH (title, body) AGAINST ('" .$row['title']. "') FROM reviews WHERE MATCH (title, body) AGAINST ('" .$row['title']. "')") or die(mysql_error());

 

but I keep getting the error "Can't find FULLTEXT index matching the column list". Is my syntax right on the first two lines?

 

This is going to be used to gather related articles based on the currect articles title and echoed as such.

 

Thanks

 

SC

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.