i want to insert server time to table.i will use mysql.
+1
A:
Use NOW()
. It's a MySQL function.
This assumes your database is on the same server as your main server.
Kerry
2010-06-09 05:09:23
A:
Use NOW()
as Kerry says. If you're using PHP and don't want the MySQL server time but the PHP time, use this:
$time = date('Y-m-d H:i:s');
$query = "INSERT INTO example(timefield) VALUES('$time');";
Emil Vikström
2010-06-09 05:11:22