Thursday, March 4, 2010

Re: Pagination issue

The ordering is taking place at the database level, so pagination is
not responsible.
You have to understand that at character column will be sorted by the
characters, so you will get the sequence of 1, 2, 20, 21 etc.
If you want a numeric sequence, use an integer column.
Hope this helps you to solve your issue!
Enjoy,
John

On Mar 4, 10:47 am, liaogz82 <liaog...@gmail.com> wrote:
> Hi all,
>
> In the database case_files I have a problem arranging a varchar
> typecalled case_file_no in ascending order. case_file_no data can be
> 2,20,21A,21B etc. If i simply just paginate the data and put
> case_file_no as ascending order, it will go 1,2,20,21,3,4,5....
> because it is in ascending type, it will look at the first character.
> So is there any solution for this? that pagination can paginate a
> varchar correctly?
>
> Gangzheng

Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.

You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en

No comments: