$sel_blogcat="SELECT * FROM sc_news_categories WHERE nc_active='Y' ORDER BY nc_priority ASC";
$qry_blogcat=mysql_query($sel_blogcat) or die(mysql_error());
$num_blogcat=mysql_num_rows($qry_blogcat);
if($num_blogcat)
{
while($row_blogcat=mysql_fetch_array($qry_blogcat))
{
$nc_front_url=$row_blogcat['nc_front_url'];
$nc_id=$row_blogcat['nc_id'];
$selblog="SELECT nr_id FROM sc_newsroom WHERE nc_id='".$nc_id."' ";
$qryblog=mysql_query($selblog) or die(mysql_error());
$num_blog=mysql_num_rows($qryblog);
//$caturl=SITE_PATH."blog/".$nc_id."@".$nc_front_url;
$caturl="/blog/".$nc_front_url;
?>