<BODY><TABLE width="760" border="0" align="center" cellpadding="0" cellspacing="0" ><tr><TD height="32" colspan="6" align="center" class="caption_style">菜單管理(系統(tǒng)只用最新10個)</TD></tr><tr align="left"><TD width="60" height="32" align="center">序號</TD><TD width="180" align="left">一級菜單名稱</TD><TD width="180" height="32" align="left">二級菜單名稱</TD><TD width="180" align="left">鏈接頁面</TD><TD width="100" align="center">移位</TD><TD width="60" height="32" align="center"> </TD></tr><%dim i,sqli=1set rs1=server.CreateObject("adodb.recordset")sq="select top 20 max(ord),mm from menu group by mm order by max(ord) desc"rs1.open sq,conn,1,1if not rs1.eof thenwhile not rs1.eofmm=rs1("mm")%><tr align="left" class="ev"><TD height="32" align="center"><%=right("0"&i,2)%></TD><TD align="left"><%=mm%></TD><TD colspan="4" height="32" align="left"><table width="100%" border="0" cellpadding="0" cellspacing="0"><%set rs=server.CreateObject("adodb.recordset")sql="select * from menu where mm='"&mm&"' order by ord desc"rs.open sql,conn,1,1while not rs.eofmm=rs("mm")sm=rs("sm")id=rs("id")hlink=rs("hlink")ord=rs("ord")%><tr align="left" id="<%=id%>|<%=ord%>"><TD width="180" height="32" align="left"><%=sm%></TD><TD width="180" height="32" align="left"><%=hlink%></TD><TD width="50" height="32" align="center"><img class="order" style="border:0px;" title="上移" src="picture/arrow_top.png"></TD><TD width="50" height="32" align="center"><img class="order" style="border:0px;" title="下移" src="picture/arrow_down.png"></TD><TD width="60" height="32" align="center"><img src="picture/bin24.png" width="24" height="24" border="0px" class="delelte" title="刪除"></TD></tr><% rs.movenextwendrs.closeset rs=nothing%></table></TD></tr><%rs1.movenexti=i+1wendend ifrs1.closeset rs1=nothingconn.closeset conn=nothing%>
這里面asp的兩個循環(huán)怎么用php改寫,我試著改寫結(jié)果無輸出一級菜單名,網(wǎng)頁也卡死,求教
手掌心
2019-04-27 12:14:24