need('date sql'); $conn = @mysql_pconnect (sqlHost, sqlUser, sqlPass); if ($conn) { $query = 'SELECT p_date, p_user, p_news FROM devel_plans' . ' ORDER BY p_date DESC'; $result = @mysql_db_query (sqlDB, $query, $conn); if ($result) { $numRows = @mysql_num_rows ($result); if ($numRows) { for ($i = 0 ; $i < $numRows ; $i++) { list ($p_date, $p_user, $p_news) = mysql_fetch_row ($result); newsItem (dateFromSQLDateTime ($p_date), $p_user, StripSlashes($p_news)); } } else { newsItem ('now', 'Web Server', '
No current news!'); } } else { newsItem ('now', 'Web Server', '
No news in database!'); } mysql_close ($conn); } else { newsItem ('Now', 'Web Server', '
Error: Could not connect to SQL server to fetch plans. Please notify the server administrator.'); } ?>