mysql_connect(localhost,$ds_Username,$ds_Password);
@mysql_select_db($ds_Database) or die( "Unable to select database");
$query = "
SELECT
ds_Category_Related.*, ds_Category.Category_Name as Category_Name,
ds_Category.Category_Text as Category_Text, ds_Category.Category_URL as Category_URL
FROM ds_Category_Related, ds_Category
WHERE
ds_Category_Related.Category_ID = '$ds_Current_Category_ID' and
ds_Category_Related.Category_Related_ID = ds_Category.Category_ID
ORDER BY ds_Category.Category_Text";
$ds_Result_Category_Related_All = mysql_query($query);
$ds_Query_Rows_Category_Related_All = mysql_numrows($ds_Result_Category_Related_All);
mysql_close();
$ds_Current_Row = 0;
$ds_HREF_Category_Current_URL = "http://" . $ds_Site_URL_2 . "/" . $ds_Module_ID_b2;
while ($ds_Current_Row < $ds_Query_Rows_Category_Related_All) {
$ds_qry_Category_ID = mysql_result($ds_Result_Category_Related_All,$ds_Current_Row,"Category_ID");
$ds_qry_Category_Name = mysql_result($ds_Result_Category_Related_All,$ds_Current_Row,"Category_Name");
$ds_qry_Category_Text = mysql_result($ds_Result_Category_Related_All,$ds_Current_Row,"Category_Text");
$ds_qry_Category_URL = mysql_result($ds_Result_Category_Related_All,$ds_Current_Row,"Category_URL");
$ds_HREF_Category_Related_URL = "http://" . $ds_qry_Category_URL . "/" . $ds_Module_ID_b2;
?>
|
=$ds_qry_Category_Text ?> |
|
$ds_Current_Row++;} ?>