麻烦帮我看看,条数多就报 502 Bad Gateway

nginx/0.7.61  5.5.3-m3-log centos 5.5

$sql = "SELECT si.subject, si.itemid, si.itemtypeid,si.dateline, sb.message, st.typename FROM ".tname('spaceitems')." si, ".tname('spaceblogs')." sb, ".tname('itemtypes')." st where si.uid = ".$uid." AND si.itemid=sb.itemid AND si.itemtypeid = st.typeid AND folder = 1 LIMIT  ".$start." ,".$end."";
$query = $_SGLOBAL['db']->query($sql);// LIMIT 0 ,200
while ($value = $_SGLOBAL['db']->fetch_array($query)) {
		//取评论
		$query2 = $_SGLOBAL['db']->query('SELECT dateline, author, message, replymessage FROM '.tname('spacecomments').' WHERE itemid = '.$value['itemid'].' AND type = "blog" ORDER BY itemid ASC');
//		$nums = mysql_num_rows($query2);
//		if ($nums > 0) {
		while ($valued = $_SGLOBAL['db']->fetch_array($query2)) {
			if (!empty($valued['replymessage'])) {
			$valued['message'] = $valued['message'].'<blockquote>博主回复:'.$valued['replymessage'].'</blockquote>';
			}
			$valued['dateline'] = sgmdate($valued['dateline'],'Y-m-d h:i:s');
			$value['comment'][] = $valued;
//		}
//			}else {
//			$value['comment'] = '';
			}
			$value['time'] = sgmdate($value['dateline'],'Y-m-d h:i:s');//2011-02-24 09:25:23
			$value['dateline'] = sgmdate($value['dateline'], $rssdateformat);
		$rssarr['data'][] = $value;
	}

 

 

你可能感兴趣的:(麻烦帮我看看,条数多就报 502 Bad Gateway)