Quote:
Originally Posted by Ted S
You can simply copy that routine and add one addition WHERE statement to the mySQL query along the lines of
createddate >= DATE_SUB(NOW(),INTERVAL 1 day)
|
Tried several different things and can't get it to work...where excactly? Also it can't find any 'createddate' but at least got rid of the error when I changed it to post dateline..but nothing shows.
$helpfulanswers = $db->query_read_slave("
SELECT post.postid,post.title as posttile,helpfulpost.goodrank,helpfulpost.totalran k,helpfulpost.lastvote,
thread.threadid,thread.title as title,thread.postusername as postusername,forum.title as ftitle $helpful_selectby
$hook_query_fields
FROM " . TABLE_PREFIX . "helpfulpost as helpfulpost
INNER JOIN " . TABLE_PREFIX . "post AS post ON(helpfulpost.postid = post.postid)
INNER JOIN " . TABLE_PREFIX . "thread AS thread ON(post.threadid = thread.threadid)
INNER JOIN " . TABLE_PREFIX . "forum AS forum ON(thread.forumid = forum.forumid)
WHERE helpfulpost.goodrank > 0
$conditions
$hook_query_joins
ORDER BY $sqlsort $sortorder
LIMIT " . ($limitlower - 1) . ", $perpage
");