标题:这个该怎么修改?
只看楼主
lquvfhp
Rank: 1
等 级:新手上路
帖 子:52
专家分:0
注 册:2007-7-28
结帖率:80%
已结贴  问题点数:6 回复次数:1 
这个该怎么修改?

        TempStr = "<?xml version=""1.0"" encoding=""utf-8""?>" & vbcrlf
        TempStr = TempStr & "<data>" & vbcrlf
        TempStr = TempStr & "    <channel>" & vbcrlf
    sqlxml="select * from pic where piccat_id=3 order by customorder asc, pic_id desc"
    set rsxml=server.createobject("adodb.recordset")
    rsxml.open sqlxml,conn,1,1
    do while not rsxml.eof
        TempStr = TempStr & "        <item>" &vbcrlf
        TempStr = TempStr & "            <link>ylhj_content.asp?id=" & rsxml("pic_id") & "</link>" &vbcrlf
        TempStr = TempStr & "            <image>" & rsxml("pic_pic") & "</image>" &vbcrlf
        'TempStr = TempStr & "            <title>" & rsxml("pic_name") & "</title>" &vbcrlf
        TempStr = TempStr & "        </item>" &vbcrlf
    rsxml.movenext
    loop
        TempStr = TempStr & "    </channel>" & VbCrLf
        TempStr = TempStr & "    <config>" & VbCrLf
        'TempStr = TempStr & "        <windowOpen>_blank</windowOpen>" & VbCrLf
        TempStr = TempStr & "        <autoPlayTime>5</autoPlayTime>" & VbCrLf
        TempStr = TempStr & "        <roundCorner>3</roundCorner>" & VbCrLf
        TempStr = TempStr & "        <titleBgColor>#eeeeee</titleBgColor>" & VbCrLf
        TempStr = TempStr & "        <btnDefaultColor>#ffffff</btnDefaultColor>" & VbCrLf
        TempStr = TempStr & "        <btnHoverColor>#000000</btnHoverColor>" & VbCrLf
        TempStr = TempStr & "        <changImageMode>hover</changImageMode>" & VbCrLf
        TempStr = TempStr & "        <transform>alpha</transform>" & VbCrLf
        TempStr = TempStr & "    </config>" & VbCrLf
        TempStr = TempStr & "</data>" & VbCrLf
    ADODB_SaveToFileUTF8 TempStr,"../xml/ylhj.xml"

我需要将这个修改成循环输出前五项,不是将文件全部输出,该怎么修改?
搜索更多相关主题的帖子: version where 
2010-08-02 11:26
wangjy500
Rank: 11Rank: 11Rank: 11Rank: 11
等 级:贵宾
威 望:13
帖 子:457
专家分:2569
注 册:2010-7-11
得分:6 
sqlxml="select top 5 * from pic where piccat_id=3 order by customorder asc, pic_id desc"
改这里就可。

QQ:63572063
2010-08-02 21:05



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-314583-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.395791 second(s), 8 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved