<table border=0 align=center cellpadding=1 cellspacing=1 cellspace=0 >
<tr><td valign=top bgcolor=ffffff id="marquePic1">
<table width='100%' border='0' cellspacing='0'><tr>
<% set rs= Server.CreateObject("ADODB.RecordSet")
sql="select top 8 topid,photoname,bigpic from zhi_rui_g_po order by topid desc" '数据表及调用的总图片数
rs.open sql,conn,1,1
if rs.eof and rs.bof then
response.Write("暂无信息!")
else
i=0
do while not rs.eof%>
<td align="center">
<a href="xxxx.asp?id=<%=rs(0)%>" title="<%=rs(1)%>"><img width="50" height="50" src="<%=rs(2)%>"><br><br><%=left(rs(1),8)%></a></td>
<%
i=i+1
rs.movenext
if i mod 4=0 then response.write ("</tr>")'每行显示的图片数
loop
end if
rs.close
set rs=nothing%>
</table>
</td><td id=marquePic2 valign=top></td></tr>
</table></div>
<script type="text/javascript">
var speed=50
marquePic2.innerHTML=marquePic1.innerHTML
function Marquee(){
if(demo.scrollLeft>=marquePic1.scrollWidth){
demo.scrollLeft=0
}else{
demo.scrollLeft++
}
}
var MyMar=setInterval(Marquee,speed)
demo.onmouseover=function() {clearInterval(MyMar)}
demo.onmouseout=function() {MyMar=setInterval(Marquee,speed)}
</script>
</div>
begin --取钱 *** 作BEGIN TRANSACTION
DECLARE @errorSum INT
SET @errorSum = 0
UPDATE cardInfo SET balance=balance-@blan1 WHERE cardID = @cardNo
SET @errorSum = @errorSum+@@error
INSERT INTO transInfo (transDate,cardID,transType,transMoney,remark) VALUES (DEFAULT,@cardNo,@type,@blan1,'该用户 是要取钱')
SET @errorSum = @errorSum+@@error
IF @errorSum<>0
BEGIN
PRINT '取钱失败'
ROLLBACK TRANSACTION --回滚
END
ELSE
BEGIN
print'取钱成功'
COMMIT TRANSACTION
END
end
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)