All I am trying to do is delete rows in a column that have a timestamp more than 2 days old.
I have tried a lot of things I have seen on here, but none of them seem to be working.
This i开发者_StackOverflow社区s the code:
$delquery = $tapeDB->query('DELETE FROM newsItems WHERE news_date < TIMESTAMPADD(DAY,-2,NOW());
These are the errors I am getting on that line:
Warning: Unexpected character in input: ''' (ASCII=39) state=1 in... Parse error: syntax error, unexpected T_STRING in...
This should be really easy but I can't figure out what I am doing wrong.
you forgot the closing quote
$delquery = $tapeDB->query('DELETE FROM newsItems WHERE news_date < TIMESTAMPADD(DAY,-2,NOW()');
精彩评论