why would my ORDER BY clause have no effect? DESC and ASC have the same effect

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • lkrubner@geocities.com

    #1

    why would my ORDER BY clause have no effect? DESC and ASC have the same effect


    It doesn't matter whether I do this:

    SELECT cbId, cbMainContent, cbDateCreated FROM mcContentBlocks WHERE
    cbWhichType='re sultMessages' AND
    cbBelongsToWhic hWebsite='.publ icdomainsoftwar e.org' ORDER BY
    cbDateCreated ASC


    or this:


    SELECT cbId, cbMainContent, cbDateCreated FROM mcContentBlocks WHERE
    cbWhichType='re sultMessages' AND
    cbBelongsToWhic hWebsite='.publ icdomainsoftwar e.org' ORDER BY
    cbDateCreated DESC


    In both case the results are reaching the screen in the same order.
    Where should I check for problems?

  • Colin McKinnon

    #2
    Re: why would my ORDER BY clause have no effect? DESC and ASC have the same effect

    lkrubner@geocit ies.com wrote:
    [color=blue]
    >
    > It doesn't matter whether I do this:
    >
    > ORDER BY
    > cbDateCreated ASC
    >
    > ORDER BY
    > cbDateCreated DESC
    >
    > Where should I check for problems?[/color]

    On a list for your DBMS (whatever that is). You might want to tell them
    which DBMS you R using and which version.

    C.

    Comment

    • Alvaro G Vicario

      #3
      Re: why would my ORDER BY clause have no effect? DESC and ASC have the same effect

      *** lkrubner@geocit ies.com wrote/escribió (15 Aug 2005 23:17:17 -0700):[color=blue]
      > In both case the results are reaching the screen in the same order.
      > Where should I check for problems?[/color]

      Before reaching PHP level, try to debug your SQL query in your favourite
      SQL client. If your query is correct, then paste some PHP code. Otherwise,
      you know where to look further.


      --
      -- Álvaro G. Vicario - Burgos, Spain
      -- http://bits.demogracia.com - Mi sitio sobre programación web
      -- Don't e-mail me your questions, post them to the group
      --

      Comment

      Working...