Another way

Results 1 to 2 of 2

Thread: Another way

  1. #1
    Join Date
    Dec 1969
    Posts
    42

    Default Another way

    I have this code:<BR>strSQL = "SELECT cod_htl,codhtl_img,file_img FROM Hotels,images WHERE cod_htl = &#039;ACHILE/ATH&#039; and cod_htl = codhtl_img"<BR>Set objRS = Server.CreateObject("ADODB.Recordset") <BR>objRS.Open strSQL, objConn<BR>set rstemp= objConn.execute (strSQL)<BR>howmanyfields=rstemp.fields.count -1<BR>%&#062;<BR>&#060;%<BR> Do while NOT objRS.EOF<BR> file_img = rstemp("file_img").value<BR> %&#062;<BR> &#060;img src="pics/&#060;%=file_img%&#062;.jpg"<BR> width = "70"<BR> height = "70"<BR> &#060;H2&#062; &#060;%=objRS("file_img")%&#062;&#060;/H2&#062;&#060;/td&#062;<BR> &#060;% objRS.MoveNext<BR>rstemp.Movenext<BR>loop%&#062;<B R>&#060;%<BR>objRS.Close<BR>objConn.Close<BR>%&#06 2;<BR>THis code will show me the photo of the desired hotels with their filename.<BR>Is there any way that i can have this in a horizontal line and not in a vertical.And also if it is possible to have the photos separeted one another from a table.As each one when it is disaplyed to be put in a column,netx to the other?

  2. #2
    Join Date
    Dec 1969
    Posts
    19,082

    Default RE: Another way

    it&#039;s the &#060;h2&#062;s that are breaking it for you (and the extraneous &#060;/td&#062;). try this<BR><BR>&#060;table&#062;&#060;tr&#062;&#060;% <BR>Do while NOT objRS.EOF<BR>file_img = rstemp("file_img").value<BR>%&#062;<BR>&#060;td&#0 62;&#060;img src="pics/&#060;%=file_img%&#062;.jpg"<BR>width = "70"<BR>height = "70"<BR>&#060;H2&#062; &#060;%=objRS("file_img")%&#062;&#060;/H2&#062;&#060;/td&#062;<BR>&#060;% objRS.MoveNext<BR>rstemp.Movenext<BR>loop%&#062;<B R>&#060;%<BR>objRS.Close<BR>objConn.Close<BR>%&#06 2;&#060;/tr&#062;&#060;table&#062;<BR>%&#062;

Posting Permissions

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