手机
当前位置:查字典教程网 >编程开发 >ASP教程 >从数据库中读取记录横向排列
从数据库中读取记录横向排列
摘要:=MaxPerPagethenexitdors.movenextloop%>记录排列如下:12345如果我想把记录排列改成12345那么以上...

<tablewidth="100%"border="0"cellpadding="0"cellspacing="0">

<%dowhilenotrs.eof%>

<tr>

<tdheight="80"><imgsrc="<%=rs("图片")%>"width="160"height="80"></td>

</tr>

<%i=i+1

ifi>=MaxPerPagethenexitdo

rs.movenext

loop

%>

</table>

记录排列如下:

1

2

3

4

5

如果我想把记录排列改成

123

45

那么以上代码该怎么改,请高手帮忙一下

复制代码 代码如下:

<tablewidth="100%"border="0"cellpadding="0"cellspacing="0">

<%i=0

dowhilenotrs.eof

ifimod3=0then%>

<tr>

<%endif%>

<tdheight="80"><imgsrc="<%=rs("图片")%>"width="160"height="80"></td>

<%

if(i+1)mod3=0then

%>

</tr>

<%endif%>

<%

i=i+1

ifi>=MaxPerPagethenexitdo

rs.movenext

loop

%>

</table>

【从数据库中读取记录横向排列】相关文章:

ASP中常用的变量命名规则

asp中用数据库生成不重复的流水号

asp 随机读取N条记录sql语句

Ajax+ASP和Flash+ASP数据读取取方法有些相似的实现方法

读取目录下的文件得到一个数组

ASP中数据库调用中常见错误的现象和解决

ASP代码实现图片上传并存入数据库中

万能数据库连接程序

ASP中怎么实现SQL数据库备份、恢复!

在asp中通过getrows实现数据库记录分页的一段代码

精品推荐
分类导航