Search:  

 
 
   All ForumsHot TopicsGallery






how-to block ads


 
Forums » Tech and Talk » OS and Software » Webmasters and Developers » Mysql Descending / Ascending order
Search Topic:
Uniqs:
461
Share Topic:
RSS topic:
toggle:
flat / full
normal / watch
Posting:
Post a:
Post a:
Odd Firefox incompatibility »
« How to embed a website onto another?  
AuthorAll Replies


dk1983

join:2003-10-18
Boise, ID
clubs:
·Qwest.net

Mysql Descending / Ascending order

Guys can someone help me out with my select statement?


That is what I have now but I cant seem to order it by speed, what gives?

data:


PetePuma
How many lumps do you want
Premium,MVM
join:2002-06-13
Arlington, VA

the "desc" after the group by seems... wrong.

You generally need both a group by and an order by.

If you add

to the end of your query, does it work?


dk1983

join:2003-10-18
Boise, ID
clubs:
·Qwest.net

reply to dk1983
WOW well Ill be!!!

You can use numbers for the column to sort by?? The things you learn just by asking

Thank you Pete


dk1983

join:2003-10-18
Boise, ID
clubs:
·Qwest.net

reply to dk1983
Guys I have another question, is it possible to run a query based on the results of another query?

For example I do a


Then search withing those results?


jayco437
Premium
join:2001-08-11
El Paso, TX
It's possible, try reading up on subselects.

Graycode

join:2006-04-17
·net2phone

reply to dk1983
said by dk1983 See Profile :

... is it possible to run a query based on the results of another query?
Subselects and also a FROM clause may be a select too. Some examples of that are in: »[SQL] How to Count() when there's no distinct column


GILXA1226
Premium,MVM
join:2000-12-29
London, OH
clubs:

reply to dk1983
said by dk1983 See Profile :

WOW well Ill be!!!

You can use numbers for the column to sort by?? The things you learn just by asking

Thank you Pete
Yes, you can use numbers, however it's always better to use the actual column names. One good reason is, it makes the query easier to read, the other good reason is that is lessens the chance of the query breaking if in a week, month, year, you add another column into the select statement that changes what the number(s) is/are of the column(s) you were sorting by.

just my $0.02.


PetePuma
How many lumps do you want
Premium,MVM
join:2002-06-13
Arlington, VA

said by GILXA1226 See Profile :

Yes, you can use numbers, however it's always better to use the actual column names. One good reason is, it makes the query easier to read, the other good reason is that is lessens the chance of the query breaking if in a week, month, year, you add another column into the select statement that changes what the number(s) is/are of the column(s) you were sorting by.

just my $0.02.
Agreed. Generally, I avoid the numeric syntax except with odd computed columns.


GILXA1226
Premium,MVM
join:2000-12-29
London, OH
clubs:

said by PetePuma See Profile :

Agreed. Generally, I avoid the numeric syntax except with odd computed columns.
You really shouldn't have to do it then, unless whatever database you are using doesn't support column aliasing.
-
Forums » Tech and Talk » OS and Software » Webmasters and DevelopersOdd Firefox incompatibility »
« How to embed a website onto another?  


Thursday, 21-Aug 08:14:49 Terms of Use | Privacy Policy | Hosting by www.nac.net - DSL,Hosting & Co-lo | feedback | contact
over 9 years online! © 1999-2008 dslreports.com.
page compression OFF
Most commented news this week
· [99] Was FiOS a Good Idea?
· [77] Landscaping, Courtesy of AT&T?
· [76] ISPs Whine About Network Neutrality 'Paranoia'
· [69] FCC Finally Issues Comcast Throttling Order
· [56] Google Launches White Space Broadband Website
· [56] Craig Moffett: Network Upgrades Are For Ninnies
· [52] Qwest, Unions Strike Deal
· [52] Did Apple iPhone Fix Make Problems Worse?
· [49] Olympics Didn't Cause The Exaflood
· [49] AT&T Cooking Up New VoIP Product
Most people now reading
· [Speed] Comcast to throttle individual users; all protocols [Comcast HSI]
· Criss Angel revealed. [56k lookout! (broadband heavy)]
· Anyone know how to capture NBCOlympics.com video streams [General Questions]
· Extjs grid combo box. [Webmasters and Developers]
· How I Stole Someone's Identity [Security]
· MA Realignment [Verizon FIOS TV]
· How do you file things on your computer? [General Questions]
· [XP Home] FAT32 vs NTFS [Microsoft help]
· how do I get the washing machine hose off the faucet? [Home Repair & Improvement]
· Is something missing? (Stove question) [Home Repair & Improvement]