|
|
qiaoan
发表于 2009-5-20 13:41:10
|
显示全部楼层
原帖由 qiaoan 于 2009-5-20 12:15 PM 发表 
我用的是lp windows主机,APS+access,
现在的问题是,数据库的不能使用复合条件:
像这段代码:set rs=conn.execute("select * from buyok_produc where online=true and Remark='1' order by AddDate desc,LarCode desc")
...
请问可以举个例子吗,我对数据库只是一知半解的,贴代码出来:
头部数据库
<%
DB="data/buyok.asp"
Response.Buffer=True
session.timeout=20
on error resume next
Set fso = Server.CreateObject("Scripting.FileSystemObject")
if fso.FolderExists(server.MapPath("include"))=false then
DB="../"&DB
end if
set fso=nothing
set conn=server.createobject("adodb.Connection")
connstr="provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath(DB)
'connstr= "driver={Microsoft Access Driver(*.mdb)};dbq=" & Server.MapPath(DB)
conn.Open connstr
调用部分代码:
<%
set rs=conn.execute("select * from buyok_produc where online=true and Remark='1' order by AddDate desc,LarCode desc")
if rs.bof and rs.eof then
%>
<tr>
<td height="150" align="center">暫時沒有推薦商品</td>
</tr>
<%
else
k=1
Do While Not rs.eof
response.write "<tr>"
for i=1 to 3
k=k+1
%> |
|