Insert DATETIME to MySQL
Hello,
I would like to make an insert to a mysql DB to a DATETIME field using the SQL now() function.
$WA_fieldNamesStr = "cname|ccompany|cphone|cemail|ccomments|cinsertdate";
$WA_fieldValuesStr = "".((isset($_POST["fld_name"]))?$_POST["fld_name"]:"") ."" . "|" . "".((isset($_POST["fld_company"]))?$_POST["fld_company"]:"") ."" . "|" . "".((isset($_POST["fld_phone"]))?$_POST["fld_phone"]:"") ."" . "|" . "".((isset($_POST["fld_email"]))?$_POST["fld_email"]:"") ."" . "|" . "".((isset($_POST["fld_comments"]))?$_POST["fld_comments"]:"") ."" . "|" . "now()";
returns an error of:
" Incorrect datetime value: 'now()' for column 'cinsertdate' at row 1 "
Why is this? Allowing SQL to set the date is the most efficient means but for some reason this is not happening.