|
主题: 使用CFOUTPUT输出多行多列
|
![](http://res.5d.cn/heads/noface.gif) s22
职务:版主
等级:4
金币:10.0
发贴:1634
|
#12003/12/4 11:36:32
使用了query.next()方法,MM的文挡里没这个方法,但是确实可以使用
<cfoutput query="getsub" maxrows="1">
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
<tr align="center">
<td><cfif getsub.recordcount gt 0 >
<cfif len(getsub.cate_image)>
<img src="#application.category.vpath##getsub.cate_image#" width="112" height="112">
<cfelse>
<img src="../images/mm2.jpg" width="112" height="112">
</cfif>
</cfif></td>
<td><cfif getsub.recordcount gt 1 and getsub.next() >
<cfif len(getsub.cate_image)>
<img src="#application.category.vpath##getsub.cate_image#" width="112" height="112">
<cfelse>
<img src="../images/mm2.jpg" width="112" height="112">
</cfif>
</cfif></td>
<td><cfif getsub.recordcount gt 2 and getsub.next()>
<cfif len(getsub.cate_image)>
<img src="#application.category.vpath##getsub.cate_image#" width="112" height="112">
<cfelse>
<img src="../images/mm2.jpg" width="112" height="112">
</cfif>
</cfif></td>
</tr>
<tr align="center">
<td><cfif getsub.recordcount gt 3 and getsub.next()>
<cfif len(getsub.cate_image)>
<img src="#application.category.vpath##getsub.cate_image#" width="112" height="112">
<cfelse>
<img src="../images/mm2.jpg" width="112" height="112">
</cfif>
</cfif></td>
<td><cfif getsub.recordcount gt 4 and getsub.next()>
<cfif len(getsub.cate_image)>
<img src="#application.category.vpath##getsub.cate_image#" width="112" height="112">
<cfelse>
<img src="../images/mm2.jpg" width="112" height="112">
</cfif>
</cfif></td>
<td><cfif getsub.recordcount gt 5 and getsub.next()>
<cfif len(getsub.cate_image)>
<img src="#application.category.vpath##getsub.cate_image#" width="112" height="112">
<cfelse>
<img src="../images/mm2.jpg" width="112" height="112">
</cfif>
</cfif></td>
</tr>
<tr align="center">
<td><cfif getsub.recordcount gt 6 and getsub.next()>
<cfif len(getsub.cate_image)>
<img src="#application.category.vpath##getsub.cate_image#" width="112" height="112">
<cfelse>
<img src="../images/mm2.jpg" width="112" height="112">
</cfif>
</cfif></td>
<td><cfif getsub.recordcount gt 7 and getsub.next()>
<cfif len(getsub.cate_image)>
<img src="#application.category.vpath##getsub.cate_image#" width="112" height="112">
<cfelse>
<img src="../images/mm2.jpg" width="112" height="112">
</cfif>
</cfif></td>
<td><cfif getsub.recordcount gt 8 and getsub.next()>
<cfif len(getsub.cate_image)>
<img src="#application.category.vpath##getsub.cate_image#" width="112" height="112">
<cfelse>
<img src="../images/mm2.jpg" width="112" height="112">
</cfif>
</cfif></td>
</tr>
</table>
</cfoutput>
|
![](http://res.5d.cn/heads/noface.gif) s22
职务:版主
等级:4
金币:10.0
发贴:1634
|
|
![](http://res.5d.cn/heads/noface.gif) 54aft
职务:普通成员
等级:2
金币:1.0
发贴:657
|
#32003/12/4 22:42:41
是什么意思呀!能不能讲清楚点?
|
![](http://res.5d.cn/heads/noface.gif) s22
职务:版主
等级:4
金币:10.0
发贴:1634
|
#42003/12/4 23:25:40
只是使用了一下一个未公开的方法,没什么. 可以不看.
|
![](http://res.5d.cn/heads/noface.gif) 雅痞公子
职务:普通成员
等级:3
金币:-3.0
发贴:732
|
#52003/12/5 0:32:23
那还是不用好,长长见识也好!
|