rendered paste body<?PHP
error_reporting(E_ALL);
$dir = $_SERVER['DOCUMENT_ROOT'];
include($dir."/index/config.php");
include($dir."/index/mysqlCon.php");
include($dir."/index/functions.php");
$dbConn = &new MySQL(dbHost, dbUser, dbPass, dbName);
$selectQuery = "SELECT `n_id`,`n_date` FROM `news` GROUP BY `n_date` ORDER BY `n_id`";
$selectResource = &$dbConn->query($selectQuery);
$months = array();
if($selectResource) {
while($data = &$selectResource->fetch()) {
$months[] = $data['n_date'];
echo $data['n_date']."<br />";
}
}
else {
echo mysql_error();
}
echo "<pre>";
print_r($months);
echo "</pre>";
?>