![]() |
lefty 2/4/2020 |
when doing an update I want to save the old data to another table. I can do this successfully but now I want to add a date to show when the data was changed but cannot work out how to do it. I've tried various versions of below to add the date but it doesn't work $data["LH_status"] = $oldvalues["L_status"]; $data["LH_updated_date"] = $session["date()"]; DB::Insert("L_History", $data );
|
P
|
PaulM author 2/4/2020 |
Try this: (); $data["LH_status"] = $oldvalues["L_status"]; $data["LH_updated_date"] =now("%m-%d-%Y"); DB::Insert("L_History", $data ); // This would be for short date 2/4/2020 - Change m% d% %Y to your needs or to match same format as LH_update_date field . You may uses - or / in between date values.
|