trana
05-29-2008, 12:45 AM
I can't seem to get my SQL syntax right for a module.
$results = $db->query_read( "SELECT t.threadid, t.title, u.username, t.forumid, t.lastpost FROM " . TABLE_PREFIX . "thread t
INNER JOIN " . TABLE_PREFIX . "user u ON t.postuserid = u.userid
WHERE t.threadid IN (-1$ids) AND t.lastpost (what do I put here) ORDER BY t.lastpost DESC LIMIT 0,$limit");
I'd like to only select threads that have been updated in the last week (7 days). Can someone help me get the timestamp syntax right?
Thanks!
$results = $db->query_read( "SELECT t.threadid, t.title, u.username, t.forumid, t.lastpost FROM " . TABLE_PREFIX . "thread t
INNER JOIN " . TABLE_PREFIX . "user u ON t.postuserid = u.userid
WHERE t.threadid IN (-1$ids) AND t.lastpost (what do I put here) ORDER BY t.lastpost DESC LIMIT 0,$limit");
I'd like to only select threads that have been updated in the last week (7 days). Can someone help me get the timestamp syntax right?
Thanks!