CodeIgniter Forums
Overriding ActiveRecord for timestamp insertion on UPDATE and INSERTS? - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: Overriding ActiveRecord for timestamp insertion on UPDATE and INSERTS? (/showthread.php?tid=47475)



Overriding ActiveRecord for timestamp insertion on UPDATE and INSERTS? - El Forum - 12-09-2011

[eluser]TheFuteballer[/eluser]
We've recently run into a need for adding timestamps in our database at the row-level. I'm hoping I can avoid going and editing every update and insert command we've ever written to add the timestamp field entry.

Is there anyway I can safely override the ActiveRecord class to do this for me on every update and insert? Or ideas on best way to approach this?