SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    Afrika
    Join Date
    Jul 2004
    Location
    Nigeria
    Posts
    1,737
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Order by product and order by price

    hi,
    i have a products page, which is sorted according to alphabetical order.

    Now i want to be able to order not just by product but also by price, because if i dont i have a senario such as

    product price
    product A 500
    product A family pack 470
    product A starter pack 450

    Now from the above the product follows the alphabetical order. But the price structure is mixed up. I want it to be ordered ASC by prodcut and also ASC by price.

    how do i achieve this ?

    thanks
    Afrika

  2. #2
    SQL Consultant gold trophysilver trophybronze trophy
    r937's Avatar
    Join Date
    Jul 2002
    Location
    Toronto, Canada
    Posts
    39,347
    Mentioned
    63 Post(s)
    Tagged
    3 Thread(s)
    Quote Originally Posted by afrika
    I want it to be ordered ASC by prodcut and also ASC by price.
    ... order by product, price
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL
    "giving out my real stuffs"

  3. #3
    Afrika
    Join Date
    Jul 2004
    Location
    Nigeria
    Posts
    1,737
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    hi Rudy,
    QUITE SIMPLE

    Guess you are the database GURU here
    Thanks for your continued assistance

    rgds
    Afrika


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •