FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » sql order but move some rows bottom
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: sql order but move some rows bottom [message #182461 is a reply to message #182445] Mon, 05 August 2013 12:57 Go to previous message
nawfer is currently offline  nawfer
Messages: 34
Registered: August 2011
Karma:
Member
in this select
$query="SELECT *
FROM table1
ORDER BY
(CASE WHEN column2 = 100 THEN 1 ELSE 0 END + CASE WHEN column3='Y' THEN
2 ELSE 0 END) ASC, column1 ASC, column2 ASC;


is possible to have a

numeration for every row;
the total number of rows
the total number rows but with not the number rows with 100 and y ?
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: fetch items from a row
Next Topic: Validate Radio Buttons?
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sat Nov 30 22:53:16 GMT 2024

Total time taken to generate the page: 0.04770 seconds