I try to create a menu system and within that menu show whatever there is in MySQL based on one column!
Example
Currently, I can add products from my admin panel and it will be added into MySQL database. When I add a product, I can give this product a brand name i.e. diesel, levi, etc.
Question 1
Now I know how to show the contents of the database in MySQL in a PHP file by using SELECT brand FROM products ...
, but this will show all the duplicated brands in my menu (e.g. 3 levi's, 6 diesels) and it will show them like:
levi
levi
levi
Diesel
Diesel
Diesel
Diesel
But I only 1 need of each. How can I do that?
Question number 2
How can I link the diesel category only to products that have that brand? For instance, if someone clicks on the diesel category, php will only show products that have the diesel brand.