asp 调用每篇文章和产品的标题 关键词
症状: 网站有两类数据,一类是类似于新闻的 存储在 news 表格里 一类是产品信息,存在products里,
现在用if 语句可以调用数据库中news的的 title keyword ,而不能调用products里面的标题 关键词等
head.asp的源代码,请教啊
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.
<html xmlns="http://www.
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<%
if Request("News_Id")<>"" then
set conn = Server.CreateObject("adodb.connection")
conn.open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source = "&Server.MapPath("App_Data/#BJdata.mdb")
Set rs = Server.CreateObject("adodb.recordset")
rs.open "Select * from bjnews where id = "&Request("News_Id"),conn,1,1
title = rs("title")
de = rs("Description")
keyword = rs("keyword")
rs.close
else
title = "百科"
de ="医学百科,医学,妇科,外科"
keyword = "医学百科,医学,妇科,外科"
end if
%>
<title><%=title%>百科</title>
<meta name="keywords" content="<%=keyword%>"/>
<meta name="description" content="<%=de%>"/>
<link href="style/style.css" rel="stylesheet" type="text/css" />
</head>