On Sun, October 29, 2006 2:06 am, Beauford wrote:
> This is how I get the data and I have no control over the actual
> layout of
> the database. So I have to work with what I have.

When you say it's "how you get the data" are they handing you a MySQL
database that is this badly-constructed?

Or are you importing data whose dates are in 'mm/dd/yyyy' format, and
failing to realize that you CAN and SHOULD convert those to date as
part of your import process.

> LOL, I don't know either. The format is - 01/01/2006. When I first did
> it I
> used 7, which should be right, but I ended up getting /2002 /2003,
> etc. So I
> went to 8 and all was well. Beats me.....

Dollars to donuts says your 'date' (which is really a string) has some
leading spaces which is messing up your count...

Of course, after you fix the import process to have an actual DATE in
your DB, this will be a non-issue...

Short-term, you should probably at least trim() the data so that your
offset of 8 is the number you would expect...

-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some starving artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

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

Reply via email to