Re: Date Handling Recommendations

From: Date: Thu, 21 Jul 2005 22:58:56 +0000
Subject: Re: Date Handling Recommendations
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-219165@lists.php.net to get a copy of this message
thanks all. i just made the changes and its working smooth. i remember having a bunch of drama trying to use DATE data type...oh well, i just needed something to get me off my butt haha thanks again On 7/21/05, Philip Hallstrom <php@philip.pjkh.com> wrote: > > Hi all, > > I need to manage some records with dates. mmddyyyy > > > > I'm putting select options breaking the three up in numeric pull > > downs. no problem gathering and storing the data in my mysql db as > > integers then posting them for existing records etc. i know their is a > > datetime datatype but it doesnt seem easier to use this data type than > > using integers...any tips or routines for handling this? > > It is much much easier to use at least the DATE type in your database. > > What if, six months from now you want to select all records that occured > on even numbered Tuesdays? > > How would you do that if all you have is integers? > > I suppose you could look at every single row and do the math in PHP, but > that's going to be a pain and won't scale very well... > > Good luck! > > -- John Martinez http://www.funkyfreshdesigns.com

« previous php.general (#219165) next »