I have a field called date_time in the database which is of type datetime.
I have a form which on submit needs to enter the current date and time in the date_time field.
How do I write my code so that the date_time field gets inserted with the current datetime.
The following is my code: (I know I can’t call NOW() like that, but I wanted to show what I want to achieve)
$qcData = Array(
"date_time" => NOW(),
"note" => $note
);
$qcNotes = new App_Model_DbTable_QCNotes();
$qcNotes->insert($qcData);
here it is from the docs