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 6210531
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T06:10:35+00:00 2026-05-24T06:10:35+00:00

I need help with a select, but before asking the question, I will give

  • 0

I need help with a select, but before asking the question, I will give a short description of how my system works:

tables I want to do the select, has a many-to-many relationship, look below:

table product:
prd_cod(pk) //stores the product code ex: 0,1,2
cat_cod(fk) 
prd_name    //stores the product name, ex: tv, gps, notebook

table description_characteristc:
prd_cod(fk) 
id_characteristic(fk)
description //stores the description of the characteristic, ex: sony, 1kg, hj10

table characteristic:
id_characteristic (pk)
name_characteristic //store the name of characteristic, ex: brand, weight, model

i have ready made in the index.php, a suggest jquery, that every word I type it’s calls a php file that makes a select and returns the result, limit of 10, but this suggest I got a ready made in the internet, therefore it’s select does not match with my business rule, however I would like to implement a new select to this suggest.

the select with like ‘%’, have to bring to the suggest box the prd_name and all description, of table description_characteristc. when the user click on the result will be sent per parameter to the other .php but this i dont need now,

when the user type ‘tv’, the select will bring the result:

tv 
tv led
tv plasm
tv samsumg

and when the user type ‘tv s’, the select will bring the result:

tv sony
tv samsumg
tv salom
tv sxxxx etc

remembering that prd_name stores only ‘tv’

  • 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-24T06:10:35+00:00Added an answer on May 24, 2026 at 6:10 am

    Try this query, which joins the two tables together. The first part of the where clause will reduce the number of rows from the product table and the second part will match relevant descriptions.

    Note: this query may not be particularly efficient.

    select p.prd_name, d.description
    from product p
        inner join description_characteristc d using (prd_cod)
    
    where _user_input_ like concat(p.prd_name, '%')
      and concat(p.prd_name, ' ', d.description) like concat(_user_input_, '%');
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need some help with SQL Query. I am trying to select all records
i need help with disk_total_space function.. i have this on my code <?php $sql=select
I need some help with Oracle's RLS feature. I have never used it before
hanks everybody to help my idiot problem (look my before post:) ) . But
I know that the question has been asked before , but it's been two
Sorry I know similar question have been asked many times before but like most
I've not used SQLite before but I'm muddling my way through it. I need
I have never done shell scripting before and need some help with a small
need help to create regular expression matching string www.*.abc.*/somestring Here * is wild card
Need help writing a script downloads data from google insight using c# this is

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.