I am trying to insert the current time and date into fields of type time and date. The line below works just fine.
mysql_query("INSERT INTO testtable (ID, CallTime, CallDate) VALUES ('1234', '12:12:12', '2001-01-01')");
When I insert the actual time and date as shown below the code below fails.
mysql_query("INSERT INTO testtable (ID, CallTime, CallDate) VALUES ('1234', date('G:i:s'), date('G:i:s'))");
If I echo date('G:i:s') and date('G:i:s') they look like they would work.
I'm guessing there is a formating problem here but need idea for how to make it work.
Thanks for a suggestion