Quote:
Originally Posted by ishare
Can not find the right variable for the forum title :
When i list the threads of forumid=2, i can sort them through the letterbar. In the current letterbar, there are "Title", "Author" and "Date" sections. I did add another section called "Forum" which will show the forum title of the thread which it belongs to.
|
query changes as
PHP Code:
SELECT t.threadid, t.title, t.postusername,t.postuserid,t.dateline, f.title as forumtitle
FROM " . TABLE_PREFIX . "thread t
LEFT JOIN " . TABLE_PREFIX . "forum f ON f.forumid=t.forumid
WHERE t.sticky=0 AND t.visible=1 AND t.forumid=3 $letterquery
ORDER BY t.dateline DESC
LIMIT 500
and Query PHPInclude Code (Before) as:
PHP Code:
$myletter1 = substr($myletter, 0, 1);
if ($myletter == '_')
{
$letterquery = "AND (t.title LIKE '0%' OR t.title LIKE '1%' OR t.title LIKE '2%' OR t.title LIKE '3%' OR t.title LIKE '4%' OR t.title LIKE '5%' OR t.title LIKE '6%' OR t.title LIKE '7%' OR t.title LIKE '8%' OR t.title LIKE '9%') ";
}
else
{
$letterquery = "AND t.title LIKE '$myletter1%'";
}
Quote:
Originally Posted by ishare
Is it possible to pull threads from different forums at same time ?
|
WHERE sticky=0 AND visible=1 AND (
forumid=103 OR
forumid=104 OR forumid=105) $letterquery