How do you insert CURDATE() and CURTIME() in MySQL?
I am inserting them into date and time fields, respectively in the DB table.
$query = "INSERT INTO `ordisp` (date, time, operator, status, completed, name, email) VALUES (CURDATE(), CURTIME(), '".$operator."', '".$status."', '".$complete."', '".$name."', '".$email."')";
Why isn’t this working?
dateandtimeare reserved words of mysql and hence should be quoted with backticks to avoid conflicting with reserved words.