Sorting by Number

4 posts by 3 authors in: Forums > CMS Builder
Last Post: August 29, 2008   (RSS)

Re: [InHouse] Sorting by Number

By Dave - August 29, 2008

There's lots of ideas in that thread Kevin suggested. I usually use: ORDER BY fieldname+0

And that forces it to be a number. It's because it's sorting them alphabetically and not numerically.

Let me know if the fieldname+0 or one of the other solutions works for you.
Dave Edis - Senior Developer
interactivetools.com

Re: [Dave] Sorting by Number - Answered.

By InHouse - August 29, 2008

Thanks all.

Dave, I suspected that was the cause. The sort by fieldname+0 solution worked like a charm and was a bit less invasive than the other option (which also worked BTW).

Sorry for the extra posting! I knew I had seen a thread on this topic before but somehow managed to miss it in my search.

J.