Cfoutput-----need Help To Select Items

Discussion in 'Programming' started by acampolonghi@gmail.com, Dec 13, 2006.

  1. #1
    Hi,

    Scenario:

    I use an XML catalogue of products that I import via cfhttp.
    This catalogue show special offers of different products.
    I am creating an output table to show the special offers starting from the lowest price.

    Problem:
    Many times one products is inserted with different special price and I find my table ( 10 rows ) with all the rows showing the same staff with diffrent price.

    What I am looking for to solve my problem:

    a condicional way to force output to show one product only one time with the lowest price and do not repet it.

    Hope that I was clear thanks for your help.

    Best Regards

    Andrea
     
    acampolonghi@gmail.com, Dec 13, 2006 IP
  2. woodside

    woodside Peon

    Messages:
    182
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    0
    #2
    If you are importing your products into a database, just do a "group by product_name" (or whatever it is) and then order by price ascending. If the product names are exact, you should just get the product with the lowest price.
     
    woodside, Dec 13, 2006 IP