select from loop
Posted: Mon Mar 27, 2006 4:10 pm
Hi,
I have a mysql database and one table is a 'product' table.
This table consists of product names, prices and types.
What i would like to be able to do is display a list of each product type that is different.
For example:
product table consists of
Name Price Type
------------------------------------------------------
giraffe £1.00 mask
lion £1.00 mask
whistle £2.00 toy
ball £1.50 toy
t-shirt £5.50 clothing
------------------------------------------------------
I want to be able to display a list of each different product type.
e.g. from the table above the list would look like:
List
--------------
mask
toy
clothing
--------------
How can i do this?
I have a mysql database and one table is a 'product' table.
This table consists of product names, prices and types.
What i would like to be able to do is display a list of each product type that is different.
For example:
product table consists of
Name Price Type
------------------------------------------------------
giraffe £1.00 mask
lion £1.00 mask
whistle £2.00 toy
ball £1.50 toy
t-shirt £5.50 clothing
------------------------------------------------------
I want to be able to display a list of each different product type.
e.g. from the table above the list would look like:
List
--------------
mask
toy
clothing
--------------
How can i do this?