Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- storing months in mysql 4
April 29, 2005, 11:16 am
rate this thread
Hello, I'm using PHP 4 and MySQL 4. I want to store the month and year
as a single row but I am having difficulty figuring out the best data
type to use. I suppose I could use 'DATE' and then always have the day
value be equal fto 1, but I figure there's a more elegant approach. I
leave it to on e of you experts to recommend one.
Thanks in advance, - Dave
Re: storing months in mysql 4
The best for WHAT? How do you intend to use the data? What
typical computations will be performed on it? What will it
be routinely compared to?
Again, depends on how you are going to use the data. Maybe
for your purposes it makes more sense to set the date to the
last day of the month...