Visualizzazione dei risultati da 1 a 4 su 4
  1. #1
    Utente bannato
    Registrato dal
    Jan 2003
    Messaggi
    2,407

    allineamento info db... ci sto impazzendo... [urgente]

    salve a tutti,

    io devo visualizzare una serie di immagini recuperando il loro nome da un db e devo sucessivamente ordinarle secondo 2 colonne.

    il codice è il seguente e il problema è che proprio non capico cosa modificare per fare in modo che si ordinino su 2 colonne.

    codice:
    			   <td width="386" valign="top" bgcolor="#FFFFFF">
    			    <table width="386" cellpadding="0" cellspacing="0">
    			 	 <tr>
    				  <td width="386" height="20" bgcolor="#b2c7dd">
                       [img]wallpapers.jpg[/img] 					  
    				  </td>
    				 </tr>
    			    </table>
    			    <table width="386" cellpadding="0" cellspacing="0">
    			 	 <tr>
    				  <td width="386" height="20" bgcolor="#FFFFFF"></td>
    				 </tr>
    			    </table>
    				<table width="386" cellpadding="0" cellspacing="0" bgcolor="#ffffff">
    				 <tr>				
    		
    				<%
    		 
    					'apro la connessione con il db
    					set myConn1 = server.CreateObject("ADODB.Connection")
    					
    					dim strConnDb1
    					strConnDb1 = ""
    					strConnDb1 = "Provider = Microsoft.Jet.OLEDB.4.0; Data Source = " & server.mappath("/mdb-database/wallpapers.mdb")
    					myConn1.Open(strConnDb1)
    							
    					mySqlSelect1 = "select * from Miniature where Sezione='" & Sezione & "' order by nomefile"
    					
    					set myRSComS1 = server.CreateObject("ADODB.Recordset")
    					
    					myRSComS1.Open mySqlSelect1, myConn1
    						
    					conta_colonne = 0
    					if not(myRSComS1.EOF) and not(myRSComS1.BOF) then	
    				
    						do while not(myRSComS1.EOF)
    						 conta_colonne = conta_colonne +1
    						 if (conta_colonne =1) or (conta_colonne =2) Then       
    				%>
    
    
    				  <td width="29"></td>
    				  <td width="150" height="113" valign="top">
    				  <%Percorso=""
    				  Percorso= Sezione & "/" & myRSComS1("nomefile") %>
    				  
    				  </td>
    
    
    		
    				<% else
    				   conta_colonne = 0 %>
    				   
    				  <td width="29"></td>
    				  <td width="150" height="113" valign="top">
    				  <%Percorso=""
    				  Percorso= Sezione & "/" & myRSComS1("nomefile") %>
    				  
    				  </td>
    				  
    						
    				<%          end if
    							myRSComS1.MoveNext
    						loop
    					else
    					end if	%>
    
    				  <td width="30"></td>
    				 </tr>
    				</table>
    
    				<%
    					myRSComS1.Close
    					set myRSComS1=nothing	
    					myConn1.Close
    					set myConn1=nothing
    				%>
    				
    			   </td>
    grazie

  2. #2
    Utente di HTML.it L'avatar di heroes3
    Registrato dal
    Aug 2001
    Messaggi
    2,483
    adesso lo ordini per una colonna
    ma qual'è il 2 campo da ordinare???

  3. #3
    Utente bannato
    Registrato dal
    Jan 2003
    Messaggi
    2,407
    no risolto era un problema di <tr> mancanti



  4. #4
    Utente di HTML.it L'avatar di heroes3
    Registrato dal
    Aug 2001
    Messaggi
    2,483


    :maLOL: :maLOL:

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2026 vBulletin Solutions, Inc. All rights reserved.