Jump to content

Searching the contents of just one field?


woolyg

Recommended Posts

Hi,

 

I'm trying to put together a script that will search the contents of just one field, specified by its row ID.

 

I'm using:

 

SELECT mailing_list,               
MATCH(mailing_list)  
               AGAINST ('$emailaddress,' IN BOOLEAN MODE) AS score FROM table
               WHERE MATCH(mailing_list)  
              AGAINST ('$emailaddress,' IN BOOLEAN MODE) 
              AND row_id='$row_id'

 

So from the code above, I wanna search the field 'mailing_list' where the row_id is of a certain value. But the result is returning information from other rows - it seems to be ignoring the AND row_id=$row_id bit..

 

Is there a way to use the search string above to have it search just the ONE field, in the ONE row?

 

All help appreciated,

woolyg.

Link to comment
Share on other sites

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.