Hi,
i'm having the following problem.
i have a list of products and each product has different items attached to them
for example(it's all about wines)
id prodid text bedrag
35 1 1 fles kist Prosecco Tallero 14,95
36 1 2 fles kist Prosecco Tallero 26,95
1 10 1x Fles Moet & Chandon in Cadeau Kistje 41,59
2 10 6x Fles Moet & Chandon in doos 120
3 10 2x Fles Moet & Chandon in Cadeau Kistje 82
4 11 1x Veuve Cliquot brut in cadeau kistje 40
7 12 1x Veuve Cliquot brut in cadeau kistje 40
and i also have the table with more productinfo in it:
id artnr naam
1 1 Prosecco Tallero
7 5 Moet & Chandon Brut
20 11 Bourgogne Joseph Drouhin
26 206 Bernardus Chardonnay
29 13 Brunello di Montalcino
now what i want to do is select all the products from the 2nd table ordered by price.
so i need to get the lowest prices in the "table 1" and order them.
this is the query i have got so far:
SELECT DISTINCT
producten.artnr,
productlines.prod_id,
producten.id,
producten.naam,
producten.land,
producten.type,
producten.kort_omschrijving,
producten.omschrijving,
producten.front,
producten.fles,
producten.doos,
producten.metadesc,
producten.metakey,
producten.title,
producten.afbeelding,
productlines.bedrag
FROM producten INNER JOIN productlines ON productlines.prod_id = producten.id
order by productlines.bedrag
i hope this is al clear. if not ask me anything :)
and i hope someone could help me out here :)