![]() |
SQL Query - Cutt off text
I am Running Logician's WebTemplates, and I can't figure out how to edit this Query so that it only grabs the first 200 characters from p.pagetext
Does anyone know how this can be done? [sql] SELECT t.threadid, t.title, t.firstpostid, t.lastpost, t.replycount, t.postusername, t.postuserid, t.lastposter, t.dateline, t.views, p.pagetext FROM " . TABLE_PREFIX . "thread t LEFT JOIN " . TABLE_PREFIX . "post p ON p.postid = t.firstpostid WHERE t.forumid = '146' AND t.open = '1' AND t.visible = '1' ORDER BY t.dateline DESC LIMIT 0 , 15 [/sql] |
[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,200) as pagetext FROM " . TABLE_PREFIX . "thread t LEFT JOIN " . TABLE_PREFIX . "post p ON p.postid = t.firstpostid WHERE t.forumid = '146' AND t.open = '1' AND t.visible = '1' ORDER BY t.dateline DESC LIMIT 0 , 15 [/sql] |
Thanks :D
|
And for future reference, a decent reference (PHP's is better but not applicable): http://www.mysql.com/doc
|
All times are GMT. The time now is 10:05 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:
|