Re: Sorting issue

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jeff wrote:
One last question.

I changed all the DB values where numbers are used - (varchar - int)

But for the well locations, there are dashes in them, I.E. 10-15-065-22

With setting the field to int, it only displays the first part.
10-15-065-22 shows as 10
There are also several other fields that use dashes.

If I set it back to varchar, will it sort it right because the numbers are
separated by an alfa character, or will I have the same problem as before?

It will sort as a string, which is what it is. Maybe you should take the dashes out and only add them back in for display purposes? Or have two columns, one with the "display" value and one with the "integer" value where the dashes have been removed.


--
---John Holmes...

Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/

PHP|Architect: A magazine for PHP Professionals – www.phparch.com





--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux