If the components are calculating the same result repeatedly as requests come in,
there's something wrong with the architecture!
<HTML>
<HEAD><TITLE>PHP & Databases</TITLE></HEAD>
<BODY>
<? require("$DOCUMENT_ROOT/navbars/header.html") ?>
<?
mysql_pconnect("localhost:3306","myuser","mypass");
$rs=mysql_db_query("mydb","
SELECT c.category_path, c.category_name FROM story s, category c
WHERE s.story_id=$STORY_ID AND c.category_id=s.category_id
");
$row=mysql_fetch_row($rs);
?>
<!-- link to the top page for this category -->
<A HREF="<? echo $row[0] ?>"><? echo $row[1] ?></A><BR>
<? require("$DOCUMENT_ROOT/navbars/footer.html") ?>
</BODY>
</HTML>