Problem with displaying/placing Number of Images in the specific areas

Discussion in 'C#' started by Fatima, Mar 14, 2007.

  1. #1
    I m wondering if somebody help me out ..i have a bit problem in ASP

    If I m using a simple code like this;

    
    Set RS = Server.CreateObject("Adodb.Recordset")
    strsql= "SELECT Images from product where status = 1 ORDER BY [Supplier]"
    RS.Open strSql,Conn,3,3
    If RS.RecordCount <> 0 then
    While not RS.EOF 
    Images= RS("Images")
    RS.MoveNext
    WEND 
    RS.Close
    
    Code (markup):
    While using this code
    "Images" is an array..(a collection of imagesname from the table "Product" whose status is 1 )
    Now I have to use first 4 images at a time among these collection of Images in the different specific locations in

    a page in the same time

    Like Inshort (For example);
    if i have a table with 1 row and 5 columns then

    image no 1 (from the collection).......should place in the 1st column
    image no 2 ........should place in the 2nd column
    3rd column should be empty
    image no 3 ........ should place in the 4th column
    image no 4 ........ should place in the 5th column
    plus no Repetition allowed and have to limit the Number of Imagename to 4 and next 4 images should display to

    another page of the same Theme and so on and on....
    An urgent reply will be appreciable
    Waiting for the response...
    Thanks in advance
    With Regards;
     
    Fatima, Mar 14, 2007 IP
  2. DeLaVega

    DeLaVega Peon

    Messages:
    10
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Hello, I did not understand very well your problem. Could you please provide another example? Thanks! :)
     
    DeLaVega, Mar 15, 2007 IP
  3. ccoonen

    ccoonen Well-Known Member

    Messages:
    1,606
    Likes Received:
    71
    Best Answers:
    0
    Trophy Points:
    160
    #3
    so you hit your database, pull back a recordset and you want to order them in columns in HTML?

    If so, just put it in a table: <table><tr><td>rs1</td><td>rs2</....</table> - if that is even what you mean, hehe. Otherwise, connect to your dB, use GetRows on it, then close your dB and resort your colleciton. when you use getrows, it auto-creates a 2-dim array for you to iterate.
     
    ccoonen, Mar 15, 2007 IP