I have 2 tables join by Many-to-Many relationship, I create the 3rd table, and I have a query like this one :
SELECT product.product_name, provider.provider_name
FROM product, provider, provider_product
WHERE product.id_product = provider_product.ref_product
AND provider.id_provider = provider_product.ref_provider
I need to group my result by product_name and the result must be in the same line, like that : if a product have a lot of providers :
my result will be :
product.product_name | provider.provider_name
this is my first product 1 | this is provider1 / this is provider2 / this is provider3
As you see, Providers are in the same line, and they are splitting by /
Use the GROUP_CONCAT() function.