PDA

View Full Version : Get thread posts


machtzu
09-28-2004, 01:09 PM
Hi

I am wanting to pull thread titles from 3 different sub forums. I know I need a querry like:

SELECT `threadid` , `title` , `forumid`
FROM `vb_thread`
WHERE 1 AND `forumid` = 3
LIMIT 3

But how do I call that from a non vb page?

miz
09-28-2004, 01:45 PM
you query is worng

$reqestedthreadid = "39"; //example to thread you want
$query = $DB_site->query_first("SELECT * from " . TABLE_PREFIX . "thread where theadid='$reqestedthreadid'");

and for exsample :
$threadtitle = $query['title'];

echo "Thread title is $threadtitle";

hope it helps...