<?php
// $Id: topic_id.php,v 1.1 2004/07/11 10:28:53 Farsus Exp $
// -------------------------------------------------------------------------//
//			       RUNCMS                                                   //
//                                                                          //
//	 reliable - Unique - Nocost &  Simplicity & ease off use                //
//                       < http://www.runcms.org >                          //
// -------------------------------------------------------------------------//
// Original Author: Half-Dead
// Author Website : http://www.e-xoops.com
// License Type   : Proprietary: See /manual/LICENSES/E-Xoops.txt
// ------------------------------------------------------------------------- //

// Forum Posts

function get_meta($id, $limit) {
global $db;

$SQL = "
	SELECT
	T.topic_title,
	P.subject,
	P.post_text
	FROM
	".$db->prefix("bbplus_topics")." T,
	".$db->prefix("bbplus_posts")." P
	WHERE P.topic_id = $id AND T.topic_id = $id";

$query = $db->query($SQL, $limit);

while (list($topic_title, $subject, $post_text) = $db->fetch_row($query)) {
	$result["title"]     = $topic_title;
	$result["keywords"] .= " ". $topic_title ." ". $subject ." ". $post_text ." ";
}

return $result;
}
?>
