我想的就是一个嵌套查询。。第一个循环是能读取的。。但是
<!--{hero:section name=loop loop=$shop}-->
<table width="758" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="8" colspan="2"></td>
</tr>
<tr>
<td style="width:130px; border-left:1px solid #CCCCCC;"><div style="width:130px; float:left; font-size:14px; font-weight:bold; color:#CC0000; line-height:30px;"><!--{hero:$shop[loop].Product_name}--></div><div style="width:130px; float:left;"><!--{hero:$shop[loop].Product_summary}--></div><div style="width:130px; float:left;">礼包价:¥<!--{hero:$shop[loop].price}-->元</div></td>
<td width="646" align="left" bgcolor="#F9F9F9">
到了这里就读取不了了
<!--{hero:
$shopcxlb_list = array();
$querys = $_SGLOBAL['db']->query("SELECT prodid,Product_name,upfile_img,price,price1,type_name FROM ".$hero."product where prodid in ($shop[loop].cpid) order by prodid desc");
while ($values = $_SGLOBAL['db']->fetch_array($querys)) {
$shopcxlb_list[] = $values;
}}-->
在模版里怎么样写这个查找语句。。
<!--{hero:section name=loop loop=$shopcxlb}-->
<li>
<img <!--{hero:if ereg("http://",$shopcxlb[loop].upfile_img) }-->src="<!--{hero:$shopcxlb[loop].upfile_img }-->" <!--{hero:else}-->src="huand/<!--{hero:$shopcxlb[loop].upfile_img}-->"<!--{hero:/if}--> border="0" />
<p><a href="shop_show.php?prodid=<!--{hero:$shopcxlb[loop].prodid}-->" target="_blank"></a></p>
<b>礼包价:¥<!--{hero:$shopcxlb[loop].price|substr:0:-3}-->元</b>
</li><!--{hero:/section}-->
</td>
</tr>
</table>
<!--{hero:/section}-->
<!--{hero:section name=loop loop=$shop}-->
<table width="758" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="8" colspan="2"></td>
</tr>
<tr>
<td style="width:130px; border-left:1px solid #CCCCCC;"><div style="width:130px; float:left; font-size:14px; font-weight:bold; color:#CC0000; line-height:30px;"><!--{hero:$shop[loop].Product_name}--></div><div style="width:130px; float:left;"><!--{hero:$shop[loop].Product_summary}--></div><div style="width:130px; float:left;">礼包价:¥<!--{hero:$shop[loop].price}-->元</div></td>
<td width="646" align="left" bgcolor="#F9F9F9">
到了这里就读取不了了
<!--{hero:
$shopcxlb_list = array();
$querys = $_SGLOBAL['db']->query("SELECT prodid,Product_name,upfile_img,price,price1,type_name FROM ".$hero."product where prodid in ($shop[loop].cpid) order by prodid desc");
while ($values = $_SGLOBAL['db']->fetch_array($querys)) {
$shopcxlb_list[] = $values;
}}-->
在模版里怎么样写这个查找语句。。
<!--{hero:section name=loop loop=$shopcxlb}-->
<li>
<img <!--{hero:if ereg("http://",$shopcxlb[loop].upfile_img) }-->src="<!--{hero:$shopcxlb[loop].upfile_img }-->" <!--{hero:else}-->src="huand/<!--{hero:$shopcxlb[loop].upfile_img}-->"<!--{hero:/if}--> border="0" />
<p><a href="shop_show.php?prodid=<!--{hero:$shopcxlb[loop].prodid}-->" target="_blank"></a></p>
<b>礼包价:¥<!--{hero:$shopcxlb[loop].price|substr:0:-3}-->元</b>
</li><!--{hero:/section}-->
</td>
</tr>
</table>
<!--{hero:/section}-->
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货