How to work with timestampdiff? |
Hi Friends,
Good Day! I would like to ask some help in working with timestampdiff. I wanted to get the time duration between the datastarted and dateresolved. and the result will be automatically inserted into the database. Below is my Report_Model Codes. Code: function get_TimeDifference($id) Code: function update_downtime($id) Please see highlighted codes Thank you and best regards, Jay
@rjay,
I'm saying first get both timestamp values into the database. Then all you have to do is create a database view that will take those two values and give you the difference (in a timestamp format). Pass that view to your controller which will pass it to your view. Then there will be no need to save the difference value in the database.
MySQL Tutorial Views
MySQL Views What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
Hi Everyone,
Thanks for helping me out , Create a view on mysql did solve my problem |
Welcome Guest, Not a member yet? Register Sign In |