Re: Dealing with Dates
From: DrTebi (DrTebi_at_yahoo.com)
Date: 12/10/04
- Next message: DrTebi: "Re: Compressing output and using flush() - is it possible?"
- Previous message: DrTebi: "Re: PHP Calendar Question"
- In reply to: Carl Carpenter: "Dealing with Dates"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 10 Dec 2004 20:12:16 +0100
On Fri, 03 Dec 2004 15:15:55 -0800, Carl Carpenter wrote:
> I'm writing an app where I want the user to be able to change a date
> on a record. Date field is 'TngDate'. I can pull the record from the
> mySql database, split it into day/month/year, put each in a drop down
> box. What I can't seem to do is collect the modified entries,
> reassemble them into a single variable and pass it on to the update
> script. I admit to being a newbie at this and most of my scripts
> (including this one) come from examples that I have found either on
> the 'Net or in books. The script below is the script I have so far.
> It's in an include file. I would appreciate any help.
>
[snip]
Whatever you do, from my experience I really recommend using timestamps
rather than dates. Just make the database field an integer like
time_stamp INT UNSIGNED NOT NULL
Then work from there. It's a lot easier to deal with PHP's date functions
when you have a timestamp, than trying to convert the database's date
fields etc.
DrTebi
- Next message: DrTebi: "Re: Compressing output and using flush() - is it possible?"
- Previous message: DrTebi: "Re: PHP Calendar Question"
- In reply to: Carl Carpenter: "Dealing with Dates"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|