<?php
/*
  显示侧边栏推荐
*/
  $recommendQuery="select * from news where recommend=1 order by addtime desc limit 0,10";//检索推荐的文章按时间降序，头10条记录
  $recommendResult=mysql_query($recommendQuery,$conn);
  while ($recommendRow1=mysql_fetch_array($recommendResult)) {
  	$recommendRow[]=array('newsId'=>$recommendRow1['newsId'],'title'=>$recommendRow1['title']);
  }
  $smarty->assign('recommendRow',$recommendRow);
  $smarty->display('siderbarRecommend.html');

?>