mysql - Getting rows of a table based on query on another table -
I have these 2 tables
[product] id company id, name, part No, IDS Group, for the company name to search the user, when searching for a company name, I have to show this column: company name, product. Name, Product. Part, Product IDS Group
Find me the company ID from this search query
Choose company.ID from the company where "$ userSearch%" such as WHERE Company.Name < / Code>
Now I want to use Company.ID for this query to get all the products from the product.
Select * Product from WHERE Company ID = "ID from previous query"
If it's in the same database, then you just have to Join Tables
Comments
Post a Comment