文章归档
2014年07月07日
暂无评论
$db = MySql::getInstance();
$sql = "SELECT gid,title,sortid,author,content,date FROM " . DB_PREFIX . "blog WHERE hide='n' and checked='y' and type='blog' ORDER BY date DESC LIMIT 0,100";
$strs = $db->query($sql);
$date = '';
while($row = $db->fetch_array($strs)){
if($date != gmdate('Y年m月',$row['date'])){
echo '
'.gmdate('Y年m月',$row['date']).'
';
}
echo '
'.gmdate('d',$row['date']).'
';
$date = gmdate('Y年m月',$row['date']);
}
?>