sorting on the first 8 digits....
| From: | John Hawkins | Date: | Wed, 16 Jan 2002 01:59:25 +0000 |
| Subject: | sorting on the first 8 digits.... | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-15865@lists.php.net to get a copy of this message | ||
Ok, I did something stupid and now I am paying the
price...
In an internal database that tracks the time and date
something happens on our site, I mistakenly forgot to
use leading zeros in the 24 hour column(s). So,
anything that happens between 1-9 am are all short by
one digit. Now, I need to create a report that shows
these transactions in the order that they happened.
The answer to this problem should be as simple as
adding a zero to the end of all records that are short
one digit. But, for reasons that I won't explain here,
that isn't possible.
So, my question is this, is there a way to do a
database call that would select all the records but
allow me to order them based on the first 8 digits
only?
If you would like an example, I need the following two
numbers to come up in the order listed.
20011012182929
2001111411322
Thanks for your time.
John
__________________________________________________
Do You Yahoo!?
Send FREE video emails in Yahoo! Mail!
http://promo.yahoo.com/videomail/