<?php

require_once("db_conn_class.php");

echo "Hello";
//creating object of database class
$dbh = new db_conn();
$dbh->set_conn();

//==================================================================================================================
//fetching Latest News

$news_id    = array();
$news_dt    = array();
$news_desc  = array();
$news_link  = array();
$news_title = array();

$no_of_news = 0;

$sql_news = "select news_id, news_dt, news_link, news_desc, news_title from tbl_news ";
$sql_news = $sql_news . "where status = 'ACTIVE' and deleted = 0 ";
$sql_news = $sql_news . "order by news_dt desc, news_id limit 2";
echo "sql_news=".$sql_news;
$result_news = mysql_query($sql_news,$dbh->link);

if($result_news)
{
	$no_of_news = mysql_num_rows($result_news);
	
	for($y=0; $y<$no_of_news; $y++)
	{
		$rw_news = mysql_fetch_array($result_news);
		
		$news_id[$y]    = $rw_news['news_id'];
		$news_dt[$y]    = $rw_news['news_dt'];
		$news_desc[$y]  = $rw_news['news_desc'];
		$news_link[$y]  = $rw_news['news_link'];
		$news_title[$y] = $rw_news['news_title'];
	}	
}
//==================================================================================================================

?>