2018-01-24, 05:26 PM
I'm trying to use TIME_NOW to count x posts in the last month. I keep running across a TIME_NOW error.
Any idea why this error is popping up? What I'm doing wrong here?
The code itself works just fine to count total posts if I take out dateline, unfortunately though I just need to count posts in the last 30 days.
Help is appreciated.
Any idea why this error is popping up? What I'm doing wrong here?
$AdminCountQuery = $db->query('SELECT COUNT(*) AS postsnumbers FROM '.TABLE_PREFIX.'users u LEFT JOIN '.TABLE_PREFIX.'posts ON (u.uid = '.TABLE_PREFIX.'posts.uid) WHERE dateline > TIME_NOW - 2592000 AND u.usergroup = 3');
$AdminCount= my_number_format($db->fetch_field($AdminCount, 'postsnumbers'));
The code itself works just fine to count total posts if I take out dateline, unfortunately though I just need to count posts in the last 30 days.
$AdminCountQuery = $db->query('SELECT COUNT(*) AS postsnumbers FROM '.TABLE_PREFIX.'users u LEFT JOIN '.TABLE_PREFIX.'posts ON (u.uid = '.TABLE_PREFIX.'posts.uid) WHERE u.usergroup = 3');
$AdminCount= my_number_format($db->fetch_field($AdminCount, 'postsnumbers'));
Help is appreciated.