while people are discussing mysql, i have a problem that i would like to pose to the group in hopes that someone has come across the solution.

when running the following, a different date should be returned for each:

SELECT DATE_SUB(DATE_SUB(CURDATE(), INTERVAL 44 DAY), INTERVAL 6 MONTH);
SELECT DATE_SUB(DATE_SUB(CURDATE(), INTERVAL 45 DAY), INTERVAL 6 MONTH);
SELECT DATE_SUB(DATE_SUB(CURDATE(), INTERVAL 46 DAY), INTERVAL 6 MONTH);
SELECT DATE_SUB(DATE_SUB(CURDATE(), INTERVAL 47 DAY), INTERVAL 6 MONTH);
SELECT DATE_SUB(DATE_SUB(CURDATE(), INTERVAL 48 DAY), INTERVAL 6 MONTH);
SELECT DATE_SUB(DATE_SUB(CURDATE(), INTERVAL 49 DAY), INTERVAL 6 MONTH);

however, for the middle 4 queries, the same date [2007-02-28] is returned. my natural assumption here is that i have uncovered a bug in the way that mysql handles the short [and leap year-able] month of february.

has anyone else encountered this and if so, any luck with a solution?

thnx,
-ja

¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Jim Anderson
-------------------------------
Mobile:      801.979.2032
AIM/YIM/MSN: thinbegin
_______________________________



Wade Preston Shearer wrote:
It appears that you can change a MySQL column's data type with both 'modify' and 'change'. What is the difference between the two? In my notes, I had 'modify' down to use for altering a data type and 'change' for renaming a column. phpMyAdmin used 'change' to change a column's data type though. Are the two synonymous?
------------------------------------------------------------------------


_______________________________________________

UPHPU mailing list
[email protected]
http://uphpu.org/mailman/listinfo/uphpu
IRC: #uphpu on irc.freenode.net

_______________________________________________

UPHPU mailing list
[email protected]
http://uphpu.org/mailman/listinfo/uphpu
IRC: #uphpu on irc.freenode.net

Reply via email to