Write current time plus 5 minutes in MySql from PHP

mysql, php

Solution

Try like this

mysql_query ("INSERT INTO PVS (time_ended) 
VALUES ((now() + INTERVAL 5 MINUTE))", $db_conx) 
or die (mysql_error());

and

mysql_query ("UPDATE PVS SET break = (now() + INTERVAL 5 SECOND) WHERE id = '$id'", $db_conx)
or die (mysql_error());

Problem

Helllo, I have a query that writes some data to the database ``` mysql_query ("INSERT INTO PVS (time_ended) VALUES (now())", $db_conx) or die (mysql_error()); mysql_query ("UPDATE PVS SET break = now() WHERE id = '$id'", $db_conx) or die (mysql_error()); ``` What I want is to store current time + 5 minutes instead of now() for time_ended, and current time + 15 seconds instead of now() for break Can someone show me the trick? Thank you!

Original source