![]() |
Quick SQL question
[sql]
SELECT t.threadid, t.title, t.firstpostid, t.lastpost, t.replycount, t.postusername, t.postuserid, t.lastposter, t.dateline, t.views, LEFT(p.pagetext,120) as pagetext FROM " . TABLE_PREFIX . "thread t LEFT JOIN " . TABLE_PREFIX . "post p ON p.postid = t.firstpostid WHERE t.forumid = '151' AND t.open = '1' AND t.visible = '1' ORDER BY t.dateline DESC LIMIT 0 , 17 [/sql] Could someone please edit this so it only grabs threads posted that day. And also one that would grab 17 of the next newest threads, not including those posted that day if possible? Thanks :) |
[sql]
SELECT t.threadid, t.title, t.firstpostid, t.lastpost, t.replycount, t.postusername, t.postuserid, t.lastposter, t.dateline, t.views, LEFT(p.pagetext,120) as pagetext FROM " . TABLE_PREFIX . "thread t LEFT JOIN " . TABLE_PREFIX . "post p ON p.postid = t.firstpostid WHERE t.forumid = '151' AND t.open = '1' AND t.visible = '1' AND t.dateline >= TIMENOW - 86400 ORDER BY t.dateline DESC LIMIT 0 , 17 [/sql] |
All times are GMT. The time now is 08:17 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|