2008-04-05, 06:52 AM
I need a little help, please.
I want to make a new page to display just contents of posts form a certain forum.
This is query
Here is contents of my test page (forum/test.php) where $fid = thread id and $tid = subject id, but I receive a blank page.
Can you help me please !?
p.s.: I'm novice... but I want to learn how can I do this
Thanks.
I want to make a new page to display just contents of posts form a certain forum.
This is query
SELECT `message` FROM `mybb_posts` WHERE fid=3 and tid=3
and I try to display just message
row, but I don't know how can I do this.Here is contents of my test page (forum/test.php) where $fid = thread id and $tid = subject id, but I receive a blank page.
<?php
$fid = 3;
$tid = 3;
$limit = 5;
$forumpath = 'forum/';
chdir($forumpath);
define("IN_MYBB", 1);
require('./global.php');
require_once MYBB_ROOT."inc/class_parser.php";
chdir('../');
$query = $db->simple_select(TABLE_PREFIX.'posts', 'message', "fid={$fid} and tid={$tid} ORDER BY tid DESC LIMIT {$limit}");
$row = $db->fetch_array($query);
$message = $parser->parse_message($row['message']);
echo("{$message}<br />");
?>
Can you help me please !?
p.s.: I'm novice... but I want to learn how can I do this
Thanks.