An example of what the code for the query might look like for you on the page is this:
<?php
$catparam_categories = "-1";
if (isset($row_WADAProducts["CategoryID"])) {
$catparam_categories = (get_magic_quotes_gpc()) ? $row_WADAProducts["CategoryID"] : addslashes($row_WADAProducts["CategoryID"]);
}
mysql_select_db($database_PowerStoreConnection, $PowerStoreConnection);
$query_categories = sprintf("SELECT * FROM ps3_categories WHERE CategoryID = %s", GetSQLValueString($catparam_categories, "int"));
$categories = mysql_query($query_categories, $PowerStoreConnection) or die(mysql_error());
$row_categories = mysql_fetch_assoc($categories);
$totalRows_categories = mysql_num_rows($categories);
?>
It would need to be just after the products recordset. You can then display the name of the category like this:
<?php echo $row_categories['CategoryName']; ?>