Hi.. I need to insert a time into an MySQL DB. It needs to be done by the php, as opposed to the database doing the maths... What is the best way to insert a "now + 24 hrs" etc into a db, I just need the value, not the SQL Statement..
Personally, I use Linux Timestamps to handle all my time/date issues. http://www.php.net/time Here's a code I would use. $one_day = (60 * 60) * 24; // Calculate one day's time in seconds $new_time = time() + $one_day; // Add the current time to your one day variable mysql_query("insert into `table` VALUES(".....,'".time()."',...."); // Your insert code here, obviously replace the ...'s with your other fields PHP: