Jump to content

DATE_SUB?


Tandem

Recommended Posts

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

Archived

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

×
×
  • Create New...

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.