i doesn't seems to get right............

i have 2 column dateline from vbulletin db editlog & post
i wanted "ORDER BY" displaying dateline depending which dateline is newer "mixing togther accordingly"

if i wrote this ORDER BY editlog.dateline, post.dateline
which is not what i wanted, as result returns new post's dateline all the way to bottom.... while recent post edit's dateline by the top

is there any way to get result returns
like sorting both column as one column

~thanks

    I suppose a CASE statement would work, something like this:

    ORDER BY CASE WHEN editlog.dateline < post.dateline 
                    THEN editlog.dateline 
                    ELSE post.dateline
                    END 
    

      edited....
      it works!!!
      after i changed the side

      editlog.dateline > post.dateline

      original msg:
      hi, tomhath, thanks for reply but doesn't seems to work as wanted

      or maybe i get the point wrong, which makes you misunderstood what i want,
      it is like treating both column as index
      and sort by which ever is greater/smaller

      example.value: post.dateline=1,3,5,7
      example.value: editlog.dateline=2,4,6,8

      output.value sorted:
      post.dateline 1
      editlog.dateline 2
      post.dateline 3
      editlog.dateline 4
      post.dateline 5
      editlog.dateline 6
      post.dateline 7
      editlog.dateline 8

        Write a Reply...