SitePoint Sponsor

User Tag List

Results 1 to 12 of 12

Threaded View

  1. #1
    SitePoint Enthusiast
    Join Date
    Mar 2002
    Location
    Italy
    Posts
    98
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Ordering by content of record

    Hi,
    I am kind of getting addicted to SPF as every question I ask always gets a quick answer... I just wish the forums covered more topics

    But let's get to my question. Let's imagine I have a database with all kinds of "monitors'" data. One of these pieces of data is the color of the monitor. Is there a way that in any search I do I can make sure the "black" monitors are always ordered first?

    Let's assume a couple things:
    1. there is a black model for every model
    2. there are all kinds of colors so that a simple "ORDER BY color ASC" will not work
    3. searches always output more than one model and the black model must appear just before the other colors of the same model

    Thanks in advance for your patience.


    Adrien
    Last edited by frodo; Nov 10, 2010 at 12:17. Reason: Added clarification


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
  •