如何使用GetDate()
而time()
不是604800
检查 14 天,例如:(TransferTime < DATEADD(DAYS,-14,GETDATE())
$count = $db->doQuery('SELECT * FROM PANEL_NT WHERE strAccountID = ?', $_SESSION['strAccountID']);
$row = $db->doRead();
if ((intval($row['nTime']) + 604800) <= time() || !$count)
{
$db->doQuery('SELECT * FROM ACCOUNT_CHAR WHERE strAccountID = ?', $_SESSION['strAccountID']);
$row = $db->doRead();
$db->doQuery('EXEC NT ?', $_SESSION['strAccountID']);
$db->doQuery('DELETE FROM PANEL_NT WHERE strAccountID = ?', $_SESSION['strAccountID']);
$db->doQuery('INSERT INTO PANEL_NT (strAccountID, nTime) VALUES (?, ?)', $_SESSION['strAccountID'], time());