How can I insert date into MySQL table?
I am having a lot of bother getting the date to insert into the MySQL table. The code generated by Dreamweaver CS4 (part of it) is:
$insertSQL = sprintf("INSERT INTO content (RegionName, `Intro Text`, Content, Photo, Title, Price) VALUES (%s, %s, %s, %s, %s, %s)",
GetSQLValueString($_POST['Region'], "text"),
GetSQLValueString($_POST['IntroText'], "text"),
GetSQLValueString($_POST['FullContent'], "text"),
GetSQLValueString($_POST['Photo'], "text"),
GetSQLValueString($_POST['Title'], "text"),
GetSQLValueString($_POST['Price'], "double"));
mysql_select_db($database_vcb, $vcb);
$Result1 = mysql_query($insertSQL, $vcb) or die(mysql_error());
}
I have searched and found posts about using DATETIME but what confuses me is when I find solutions that posr handwritten PHP code because I do not know how to incorporate this into the code that is written by Dreamweaver. What I need is to have the date that the record was added into the database.
