Jump to content

[SOLVED] MATCH - AGAINST Query - help required?


Teamwolf2000

Recommended Posts

Hi,

I wondered if any of you experts could help me.

I am trying to query a keyword table and return the items that are joined to the keyword table via a simple join table. I would like to use the Match Against on the query as a search.

 

The following query works as expected:

 

SELECT GalleryItem.*

FROM GalleryItem, Keywords, KeyItemJoin

WHERE GalleryItem.ID = KeyItemJoin.ItemID

AND Keywords.keyword LIKE  $SearchId

LIMIT 0 , 30

 

Using Match Against include in the query (below) returns Zero results, but should return some results:

 

SELECT GalleryItem. * ,

MATCH (Keywords.Keyword)

AGAINST ($SearchId) AS score

FROM GalleryItem, Keywords, KeyItemJoin

WHERE GalleryItem.ID = KeyItemJoin.ItemID

AND MATCH (Keywords.Keyword)

AGAINST ($SearchId)

LIMIT 0 , 30

 

I am sure its prety simple, but I can not get it to work correctly.

Any help much appreciated.

 

Many thanks.

 

Link to comment
https://forums.phpfreaks.com/topic/51288-solved-match-against-query-help-required/
Share on other sites

Hi,

Thanks for the response.

here is the site it is on:

www.frittendenphotos.co.uk

 

I have also attached the SQL file

 

I would like the search to use the query above to select the items based on the serch text from the keyword table.

 

Many thanks for your help and time.

 

Cheers,

 

[attachment deleted by admin]

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.