Jump to content


This topic is now archived and is closed to further replies.



Recommended Posts

I want to use the mysql DATE_SUB function, but i want the interval time to be specified with a variable.

$ter_check = mysql_query("DELETE FROM BLAH WHERE OCCUPANT='$_SESSION[username]' AND NOW() < DATE_SUB(ENTERED, INTERVAL '$ter_res[11]' HOUR)");

Is this possible, and if so, is the way above the right way?

Share this post

Link to post
Share on other sites


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.