Home > php_mysql > MySQL insert date

MySQL insert date

$add2h = time() + (7 * 60 * 60);
$dt=date("Y-m-d H:i:s", $add2h);
$time = $dt;

$query = "INSERT INTO slovarji (id, language, geslo, time)
VALUES ('', '$language', '$geslo', '$time')";

$results = mysql_query($query) or die
("Could not execute query : $query." . mysql_error());
Categories: php_mysql Tags:
  1. No comments yet.
  1. No trackbacks yet.

17043 pages viewed, 0 today
11075 visits, 0 today
FireStats icon Powered by FireStats