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

Home » Imported messages » comp.lang.php » sql how to have the total rows number in this case nawfer
Show: Today's Messages :: Unread Messages :: Show Polls :: Message Navigator
| Subscribe to topic | Bookmark topic 
Switch to threaded view of this topic Create a new topic Submit Reply
sql how to have the total rows number in this case nawfer [message #182512] Fri, 09 August 2013 10:12
nawfer is currently offline  nawfer
Messages: 34
Registered: August 2011
Karma: 0
Member
add to buddy list
ignore all messages by this user
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;


how to have
a) the numeration for every row;
b) the total number of all the rows
c) the total number of column2 = 100 rows
d) the total number of column3='Y' rows ?
Quick Reply
Formatting Tools:   
  Switch to threaded view of this topic Create a new topic
Previous Topic: sql how to have the total rows number in this case
Next Topic: sql how to have the total rows number in this case (this is correct question)
Goto Forum:
  

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

Current Time: Fri Dec 15 18:33:18 EST 2017

Total time taken to generate the page: 0.00562 seconds