[PHP] Current date time in MySQL datetime format

2002-06-22 Thread Phil Schwarzmann
I want to produce the current date time in a MySQL datetime format that I can then put into a MySQL database. How do I do this? I've tried mktime() and getdate() but it's not working. Thanks!!

Re: [PHP] Current date time in MySQL datetime format

2002-06-22 Thread Rasmus Lerdorf
Use the date() function. On Sat, 22 Jun 2002, Phil Schwarzmann wrote: I want to produce the current date time in a MySQL datetime format that I can then put into a MySQL database. How do I do this? I've tried mktime() and getdate() but it's not working. Thanks!! -- PHP General

RE: [PHP] Current date time in MySQL datetime format

2002-06-22 Thread John Holmes
Use NOW() in your query... INSERT INTO table VALUES (NOW()),'John'); ---John Holmes... -Original Message- From: Phil Schwarzmann [mailto:[EMAIL PROTECTED]] Sent: Saturday, June 22, 2002 12:56 PM To: [EMAIL PROTECTED] Subject: [PHP] Current date time in MySQL datetime format I