Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3237908
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T17:47:35+00:00 2026-05-17T17:47:35+00:00

If I have a table on my DB called product_tags with 2 fields: tag_id

  • 0

If I have a table on my DB called product_tags with 2 fields: tag_id and tag_name

Here is the schema:

CREATE TABLE `product_tags` (
 `tag_id` int(11) NOT NULL auto_increment,
 `tag_name` varchar(255) NOT NULL,
 PRIMARY KEY  (`tag_id`),
 UNIQUE KEY `tag_name` (`tag_name`)
) ENGINE=MyISAM AUTO_INCREMENT=84 DEFAULT CHARSET=utf8

Say here some tags in it:

  • yellow gold
  • yellow diamond
  • white gold
  • rose gold
  • band
  • diamond
  • blue diamond
  • pink diamond
  • black diamond

And I want to do a search on the string “yellow gold diamond band“

I only want to pull the following tags:

  • yellow gold
  • band
  • diamond

Because only those tags are exactly in the string. yellow and diamond are both in the string but not together so the yellow diamond tag should be ignored.


-Additionally if possible

If I did the search for “yellow gold blue diamond band“

I only want to pull the following tags:

  • yellow gold
  • band
  • blue diamond

the diamond tag would be ignored because the blue diamond tag would be the match.


How can I do this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T17:47:36+00:00Added an answer on May 17, 2026 at 5:47 pm

    edit:

    select
       *
    from 
       product_tags P
    where
       INSTR('yellow gold diamond band', P.tag_name) > 0
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We have a table called table1 ... (c1 int indentity,c2 datetime not null,c3 varchar(50)
I have a product table called products It has 3 fields (name,model(PK), and class_name).
I have an int field in my product table called product_stat which is incremented
I have a MySql table called reviews which stores a lot of product reviews,
I have a table called Products in my database. It has a couple of
I have a table called products containing a field called price and I simply
I have a products table with a column of type SET (called especialidad), with
I have table called stats . In am inserting yes or no in the
i have table called as Support, which have a field named Name and contains
I have table called Buttons. Buttons table i have column button_number . Table contain

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.