Display data From database into 2 Column

传话77

传话77

2016-01-29 18:11

Display data From database into 2 Column,Display data From database into 2 Column
  <%
Conn_String = "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=" & Server.MapPath("link.mdb")
Set Conn=Server.CreateObject("ADODB.Connection")
Conn.Open Conn_String
sql = "select * from cat order by ID"
set rs = Conn.Execute (sql)
'Connect to database
%



<table border="0" width="300"

<%
Do while NOT rs.EOF
ColNum = 1
 Do while ColNum < 3
%

<!-- First column--
<TD ALIGN=LEFT VALIGN=middle WIDTH="150"<a href="showlink.asp?CatID=<%=rs("id")%"<%=rs("cat")%
</a</TD

<%
if NOT rs.EOF then
rs.MoveNext
end if
ColNum = ColNum + 1
if NOT rs.EOF then
%

<!-- second column--
<TD ALIGN=LEFT VALIGN=middle WIDTH="150"<a href="showlink.asp?CatID=<%=rs("id")%"<%=rs("cat")%</a</TD

<%
end if
ColNum = ColNum + 1
Loop
%

</TR



<%
if NOT rs.EOF then  
rs.MoveNext  
end if
Loop
%

</TABLE

<% rs.close
Conn.Close
set Conn = nothing
%


 
展开更多 50%)
分享

猜你喜欢

Display data From database into 2 Column

ASP
Display data From database into 2 Column

Add data to the Access database using ADO

编程语言 网络编程
Add data to the Access database using ADO

s8lol主宰符文怎么配

英雄联盟 网络游戏
s8lol主宰符文怎么配

Javascript miscellanea -display data real time, using window.status

Web开发
Javascript miscellanea -display data real time, using window.status

盘古cydia提示failure when receiving data from the peer怎么办?

手机软件 应用软件
盘古cydia提示failure when receiving data from the peer怎么办?

lol偷钱流符文搭配推荐

英雄联盟 网络游戏
lol偷钱流符文搭配推荐

Far from eyesfar from heart

电脑入门
Far from eyesfar from heart

js类 from qq

Web开发
js类 from qq

lolAD刺客新符文搭配推荐

英雄联盟
lolAD刺客新符文搭配推荐

如何使用asp创建dsn

如何使用asp创建dsn

Photoshop教程:给插画人物灵梦上色全过程

Photoshop教程:给插画人物灵梦上色全过程
下拉加载更多内容 ↓