Search:  

 
 
   All ForumsHot TopicsGallery






how-to block ads


 
Forums » Tech and Talk » OS and Software » Webmasters and Developers » Mysql Descending / Ascending order
Search Topic:
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


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

reply to dk1983
Re: Mysql Descending / Ascending order

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?  


Friday, 21-Nov 12:17:12 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
· [198] Obama FCC Selection Team Won't Make AT&T Happy
· [104] DSL's Not Dead Yet
· [80] Zone Alarm Pro Free Just For Today
· [79] Harvard Law Professor Sues RIAA
· [70] Storm Reviews Come Rolling In
· [67] New Xbox 360 'Experience' Goes Live
· [66] CRTC Rules Against Indie ISPs In Throttling Dispute
· [51] Cable Grabbing 71% Of New Broadband Customers
· [48] Comcast DOCSIS 3.0 Hits Pacific Northwest In December
· [44] Comcast Offers 'Bare Bones' 768kbps VoIP Double Play
Most people now reading
· CRTC ruling coming Thursday Nov 20 [TekSavvy]
· We're not endorsing internet throttling: CRTC [TekSavvy]
· Pentagon Hit by Unprecedented Cyber Attack [Security]
· [Rant] Spelling on the Internet [Rants, Raves, & Praise]
· Appliance repair bill question. [Home Repair & Improvement]
· [iPhone] 2.2 out now [All things Macintosh]
· wow account hacked [World of Warcraft]
· Rocky - time to offer VPN service to all your customers [TekSavvy]
· [ Professions] WotLK engineering [World of Warcraft]
· Will Bell start capping TS users now? [TekSavvy]