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? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.