Dear God, This is the case, now to read the information about the product from the database, and then a product may correspond to a plurality of origin, each origin has the name of the origin, if a product has more than one origin, in the product list corresponding to the search bar can be found in the product name of each of the products to change products, But in the product list of a product can display a record, how can I do?
Reply to discussion (solution)
Motioned
Select Products, Group_concat (origin) as Origin from table group by products
You can get the result.
Product 1 Origin 1, Origin 2, Origin 3
Big God main now SQL too complex ask where to add more appropriate
I don't know how to add it in Left_join.
A table query there are so many joins AH you this SQL statement to optimize the query rather slow
Mainly do the functions involved too much service, this also no way, query speed is OK, now is the function did not meet the demand, the origin of all the query out the list has many records, display a record query origin name also default last tangled then Group_concat in left The join doesn't know how to use the right
It's better to check the display list when you print it.