mysql & php: adding time or day to the created/ updated time in the database

This is the time formate I store in my mysql database for each item of a data injection, for instance,

2010-12-04 16:00:09

I will output the time like this

echo $item['item_updated'];

but I want to add 24 hours or 48 hours or maybe a week of hours to this time output - how can I do that?

the result will be like, for instance,

2010-12-05 10:00:09 // due to 2010-12-04 16:00:09 + 24 hours



Consider using PHP DateTime Object and it's relevant member method.

Need Your Help

Differences in php 5.3.10 and 5.3.15?

php sql osx-lion version ubuntu-12.04

I'm running the exact same PHP script on two different servers as a web service for an app. One executes all queries (the one running 5.3.15) and the other (running 5.3.10) does not run certain que...

Align image to top right

html css

My site has a logo with images on both sides. I know the width and height of the logo, but the images vary. I have placed an image in the top left corner and did a 10px margin. I now want to do the...

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.