<?php
// $Id: storyid.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
// ------------------------------------------------------------------------- //

// Story Articles

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

$SQL = "SELECT
	".$db->prefix("topics.topic_title").",
	".$db->prefix("stories.title").",
	".$db->prefix("stories.hometext").",
	".$db->prefix("stories.bodytext")."
	FROM
	".$db->prefix("stories")."
	INNER JOIN
	".$db->prefix("topics")."
	ON
	".$db->prefix("stories.topicid")."=".$db->prefix("topics.topic_id")."
	WHERE
	".$db->prefix("stories.storyid")."=$id";

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

list($topic, $title, $hometext, $bodytext) = $db->fetch_row($query);
	$result["title"]    = $topic .", ". $title;
	$result["keywords"] = $topic ." ". $title ." ". $hometext ." ". $bodytext;

return $result;
}
?>
