Jump to content

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]

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.