左边框格复制asp前台调用数据到右边框出现数据是重复的,请老师帮忙,我是新手。
我复制左边框格中的asp编码,到右边框里,想在加一段前台调用,我在后台栏目中添加了两条数据。可是前台调用确出现重复的。
(我是复制左边的asp编码的,两个一样没有改动,就是改了sql调用id)
<!--#include file="bttitle.asp" -->
<!--#include file="Inc/SysProduct.asp" -->
<script language="JavaScript">
<!--
var flag=false;
function DrawImage(ImgD){
var image=new Image();
image.src=ImgD.src;
if(image.width>0 && image.height>0){
flag=true;
if(image.width/image.height>= 130/110){
if(image.width>130){
ImgD.width=130;
ImgD.height=(image.height*130)/image.width;
}else{
ImgD.width=image.width;
ImgD.height=image.height;
}
ImgD.alt="点击查看详细信息...";
}
else{
if(image.height>110){
ImgD.height=110;
ImgD.width=(image.width*110)/image.height;
}else{
ImgD.width=image.width;
ImgD.height=image.height;
}
ImgD.alt="点击查看详细信息...";
}
}
}
function CheckAll(form)
{
for (var i=0;i<form.elements.length;i++)
{
var e = form.elements[i];
if (e.Name != "chkAll")
e.checked = form.chkAll.checked;
}
}
//--> </script>
<script language="javascript">
var win = null;
function NewWindow(mypage,myname,w,h,scroll){
LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
settings =
'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars=yes,resizable=no '
win = window.open(mypage,myname,settings)
}
</script>
<html xmlns="http://www.
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<link href="css.css" rel="stylesheet" type="text/css">
<title><%=bttitle%></title>
</head><div align="center">
<!--#include file="top.asp" -->
<body>
<table width="914" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="244" valign="top"><!--#include file="left.asp" --></td>
<td width="9" height="530" background="images/c_07.jpg"> </td>
<td width="661" valign="top"><table width="661" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="45" colspan="2" valign="bottom" background="images/c_08.jpg"><table width="661" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="574"> </td>
<td width="87" height="40"><a href="product.asp" class="am">> 更多</a> </td>
</tr>
</table></td>
</tr>
<tr>
<td height="181" colspan="2"><!--#include file="inpro.asp" --></td>
</tr>
<tr>
<td height="45" colspan="2" valign="bottom" background="images/c_21.jpg"><table width="661" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="574"> </td>
<td width="87" height="40"><a href="news.asp" class="am">> 更多</a> </td>
</tr>
</table></td>
</tr>
<tr>
<td height="267" colspan="2" valign="top"><table width="328" border="0" cellspacing="0" cellpadding="0" height="8">
<tr>
<td></td>
</tr>
</table>
<table width="293" border="0" align="center" cellpadding="0" cellspacing="0">
<%
set rs22 = server.CreateObject("ADODB.Recordset")
sql22="select * from news where bigclassname='公司新闻' order by id desc "
rs22.open sql22,conn,3,1
rs22.pagesize = 15
m2=1
%>
<%
if not rs22.eof then
Do While Not rs22.Eof and m2 <= rs22.pagesize
%>
<tr>
<td height="26" background="imagess/newline.jpg"><table width="549" border="0" align="right" cellpadding="0" cellspacing="0">
<tr>
<td width="278" height="33"><a href="shownews.asp?id=<%=rs22("id")%>" class="a1"> <%=left(rs22("title"),21)%></a><a href="shownews.asp?id=<%=rs22("id")%>" class="a1">...</a>
<div align="right"><a href="shownews.asp?id=<%=rs22("id")%>" class="a1"></a></div></td>
<td width="271"><table width="271" height="28" border="0" cellpadding="0" cellspacing="0">
<%
set rs5 = server.CreateObject("ADODB.Recordset")
sql5="select * from news where bigclassname='植物指南' order by id desc "
rs5.open sql5,conn,3,1
rs5.pagesize = 15
m2=1
%>
<%
if not rs5.eof then
Do While Not rs5.Eof and m2 <= rs5.pagesize
%><tr>
<td width="271"><a href="shownews.asp?id=<%=rs5("id")%>" class="a1"> </a><a href="shownews.asp?id=<%=rs5("id")%>" class="a1"><%=left(rs5("title"),15)%></a><a href="shownews.asp?id=<%=rs5("id")%>" class="a1">...</a>
<div align="right"><a href="shownews.asp?id=<%=rs5("id")%>" class="a1"></a></div></td>
</tr><%
rs5.MoveNext
m2=m2+1
loop
rs5.close
end if
set rs5 = nothing
%>
</table></td>
</tr>
</table></td>
</tr>
<%
rs22.MoveNext
m2=m2+1
loop
rs22.close
end if
set rs22 = nothing
%>
</table></td>
</tr>
</table>
<table width="100" border="0" align="center">
<tr>
<td><img src="guanggao/1.jpg" alt="" width="472" height="143" align="middle"></td>
</tr>
</table>
</table>
</body><!--#include file="bottom.asp" --></div>
</html>
我复制左边框格中的asp编码,到右边框里,想在加一段前台调用,我在后台栏目中添加了两条数据。可是前台调用确出现重复的。
(我是复制左边的asp编码的,两个一样没有改动,就是改了sql调用id)