麻烦帮我看看,条数多就报 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;
	}

 

 

转载于:https://my.oschina.net/waney/blog/14541

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值