define('ITEMS_PER_PAGE', 10); $items_per_page = 10; $link = mysql_connect("localhost", "cusatweb", "webcusat"); mysql_select_db("web", $link); $query = "SELECT * FROM news where UNIX_TIMESTAMP(eventdate) >= UNIX_TIMESTAMP(CURDATE()) AND priority !=0 ORDER BY priority, UNIX_TIMESTAMP(eventdate) "; $result = mysql_query($query, $link); $num_news = mysql_num_rows($result); $news = array(); for($i=0; $i<$num_news; $i++){ $news[] = mysql_fetch_assoc($result); } // fetch the records $query = "SELECT * FROM seminars where (UNIX_TIMESTAMP(eventdate) >= UNIX_TIMESTAMP(CURDATE())) and display = 'Y' ORDER BY UNIX_TIMESTAMP(eventdate)"; // $query = "select * from tenders"; // echo $query; $query_result = mysql_query($query); $num_seminars = mysql_num_rows($query_result); // echo "Records:".$num_rows; $seminars = array(); for($i=0; $i<$num_seminars; $i++){ $seminars[] = mysql_fetch_assoc($query_result); } //------------------------------------------------------------------------ ?>