Jump to content

order by top auction then by date


UnknownPlayer

Recommended Posts

Hi,

how can i make to auctions be ordered by top field(it will have 0, 1 and 2 values) in mysql to order first by '2' then '1' then '0', and all that to be ordered by date DESC, can that be done ?

 

Example(timestamp is not correct, but its example)

  id      times    text          top

  ----------------------------------

    1        2        text1          0

    2        10      text2          0

    3        20      te32          0

    4        15      te123        0

    5        6        text1          0

    6        7        text2          0

    7        8        another      1

    8        9        sadasd      2

    9        10        hi              3

 

 

To be ordered like this:

    9        10        hi              3

    8        9        sadasd      2

    7        8        another      1

    3        20      te32          0 (time is 20 here, to order by highest..)

    4        15      te123        0

    2        10      text2          0

    6        7        text2          0

    5        6        text1          0

    1        2        text1          0

Link to comment
https://forums.phpfreaks.com/topic/247767-order-by-top-auction-then-by-date/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.