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

  • Home
  • SEARCH
  • 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 6766945
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T14:53:32+00:00 2026-05-26T14:53:32+00:00

for example: the table named products there is a product name field in the

  • 0

for example: the table named products there is a product name field in the table. i want to show some related items which matched by the knowed products’s product name.

how to write the sql query command?

eg: if the knowed products’s product name is

True Blood Season 1 DVD

i want to get all the product name which begins as True Blood Season..

if the knowed products’s product name is

 24 Hours Season 7 DVD

i want to get all the product name which begins as 24 Hours Season..

the sql: what’s error with the sql

$query ="select p.products_id, pd.products_name, p.products_price
                     from " . TABLE_PRODUCTS . " p " .
                             TABLE_PRODUCTS_DESCRIPTION . " pd
                     where p.products_status = 1
                     and p.products_id = pd.products_id
                     and pd.language_id = '" . (int)$_SESSION['languages_id'] . "'
                    and p.products_id <> :product_id AND MATCH('products_name') AGAINST (:products_name IN NATURAL LANGUAGE MODE);
  • 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-26T14:53:32+00:00Added an answer on May 26, 2026 at 2:53 pm

    I’d look at using MySQL Full-Text search.

    This should be able to take the title of your chosen product and use it to retrieve relevant matches, eg

    SELECT * FROM `products`
    WHERE `id` <> :product_id -- don't return current product
    AND MATCH(`product_name`)
    AGAINST (:product_name IN NATURAL LANGUAGE MODE)
    

    This requires you to create a full-text index on your products.product_name column.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

For example, I have a table, and there is a column named 'Tags'. I
How would I show, for example, the 10 most populous products in a table?
I have two tables, for example: Table A Table B ======= ======= Name |
This is my example of my table: id | name | foreign_id | -------------------------
Wordpress, for example, has a table with name => value rows for storing application-wide
For example I got this 2 table dbo.fc_states StateId Name 6316 Alberta 6317 British
i have a table t_points in mySql like example in below. Name Surname Point
I am having a common field in ten tables with different field name. example:
I have one table: dbo.Product Two columns: SKU Name --- ---- 100A-B (F102397) 1
Here is my problem. For example I have a table Products that contains a

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.