Heres the problem...
I have a table storing category names and names to icon pictures for them. looks like this:
ID3 | catname | caticon
Now, when products are entered into a different table, you have to choose from a drop down of the created categories. This table stores what category the product is in, so when i query the db i use this:
"select distinct cats from products"
The products talbe is setup kind of like this:
ID | name | price | cats
So i want to select ONLY the used categories which is why i query the products table, but when i print the query onto the page I want to be able to display the icons....
I'm guessing i need to match the result of "select destinct cats from products" to the catname in table1... possibly a "JOIN" but im unsure how to use them...
😕
what about a left join of some kind.. im only guessing...
select * from table1 left join products on catname = cats";