Results 1 to 2 of 2

Thread: Photo Album script

  1. #1
    Join Date
    Nov 2005
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Photo Album script

    Photo Album script
    http://www.dynamicdrive.com/dynamic.../photoalbum.htm


    I am trying to use your script for photo album, I need some assistance with how to populate the array from my recordset named: rs_pics displayed below is the select query which creates the recordset and belwo that the array with the first part written correctly using the reocrdset, but I need to know how to create a moveNext until rs_pics.EOF in this? Thanks for the help.

    SQLQuerymake= "SELECT * FROM tbl_products where product_label= '" & strproductlabel & "' AND product_type='" & strproducttype & "' AND department='" & strdepartment & "'"
    set rs_pics=objconn.execute(SQLQuerymake)

    var galleryarray=new Array()
    galleryarray[0]=["<%=rs_pics("menufile")%>", "optional description", "productpicB.asp?product=<%=rs_pics("product_id")%>"]
    galleryarray[1]=["images.jpg", "optional description", "optional url"]
    galleryarray[2]=["image.jpg", "optional description", "optional url"]

  2. #2
    Join Date
    Nov 2005
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I have solved my problem and this is how:

    "<%
    dim counter
    counter = 0
    Do while not rs_pics.EOF
    %>"
    galleryarray[<%=counter%>] = ["<%=rs_pics("menufile")%>", "<%=rs_pics("product_name")%>", "optional url","<%=rs_pics("product_id")%>","<%=rs_pics("large_media_file_name")%>"]

    "<% counter = counter + 1
    rs_pics.moveNext
    Loop
    %>"

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •