Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 [Solved] Display/Sort forum threadlist with xthread field ?
ZiNgA BuRgA Offline
Fag
*******
Posts: 3,357
Joined: Jan 2008
Post: #22
RE: Display/Sort forum threadlist with xthread field ?
Yes, it is by lastpost as you can see from the query (note the ORDER BY clause):

SQL Code
1
2
3
4
5
6
7
SELECT t.*, tfd.`cl_` AS `xthreads_cl_`, tfd.`sl_` AS `xthreads_sl_`, tfd.`hrn_` AS `xthreads_hrn_`, tfd.`hrp_` AS
`xthreads_hrp_`, tfd.`bp_` AS `xthreads_bp_`, tfd.`bpj_` AS `xthreads_bpj_`, tfd.`tow_` AS `xthreads_tow_`, t.username AS
threadusername, u.username
FROM mybb_threads t LEFT JOIN mybb_users u ON (u.uid = t.uid) LEFT JOIN `mybb_threadfields_data` tfd ON t.tid=tfd.tid
WHERE t.fid='24' AND (t.visible='1' OR t.visible='0')
ORDER BY t.sticky DESC, t.lastpost desc
LIMIT 0, 20


If it's "cl_", then you need to use that as the key, ie sort by "tf_cl_"


My Blog
(This post was last modified: 03-14-2012 10:27 AM by ZiNgA BuRgA.)
03-14-2012 10:26 AM
Find all posts by this user Quote this message in a reply

« Next Oldest | Next Newest »

Messages In This Thread
RE: Display/Sort forum threadlist with xthread field ? - ZiNgA BuRgA - 03-14-2012 10:26 AM

 Standard Tools
Forum Jump: