Tandem Posted October 8, 2006 Share Posted October 8, 2006 I want to use the mysql DATE_SUB function, but i want the interval time to be specified with a variable.[code]<?php$ter_check = mysql_query("DELETE FROM BLAH WHERE OCCUPANT='$_SESSION[username]' AND NOW() < DATE_SUB(ENTERED, INTERVAL '$ter_res[11]' HOUR)");?>[/code]Is this possible, and if so, is the way above the right way? Link to comment https://forums.phpfreaks.com/topic/23320-date_sub/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.