Visualizzazione dei risultati da 1 a 2 su 2

Discussione: Tabella che va a capo

  1. #1

    Tabella che va a capo

    Salve a tutti, ho fatto uno script che ogni record lo mette in una tabella, e ne crea un'altra affiancata e via dicendo, solo che alla 4 tabell vorrei mandarlo a capo, ho elaborato uno script ma non funziona, lo posto, è possibile avere una correzione gentilmente???

    codice:
    <%
    set connessione = Server.CreateObject("ADODB.Connection")
    connessione.Open ("Provider = Microsoft.Jet.OLEDB.4.0; Data Source = d:/database/vetrina.mdb")
    
    set recset = Server.CreateObject("ADODB.Recordset")
    set recset = connessione.Execute("Select * from vetrina1")
    
    do while NOT recset.EOF 
    x = 0
    	do until (x=4)
    	x = x + 1
    
    		%>
    		<table width="144" border="1" align="left">
      		<tr> 
        	<td width="138"><div align="center"><%= recset("codice") %></div></td>
      		</tr>
      		<tr> 
        	<td><div align="center"></div></td>
      		</tr>
      		<tr> 
        	<td><%= recset("nome")&" - "& recset("descrizione") %></td>
      		</tr>
      		<tr> 
        	<td><div align="center"><%= recset("prezzo") %></div></td>
      		</tr>
    		</table>
    		<%
    		if x=5 then 
    		x = 0 
    		response.Write("
    ") 
    		end if
    		recset.Movenext
    	Loop
    loop
    recset.Close
    set recset = Nothing
    connessione.Close
    set connessione = Nothing
    %>
    Grazie, ciao.

  2. #2
    Moderatore di ASP e MS Server L'avatar di Roby_72
    Registrato dal
    Aug 2001
    Messaggi
    19,559
    codice:
    <%
    set connessione = Server.CreateObject("ADODB.Connection")
    connessione.Open ("Provider = Microsoft.Jet.OLEDB.4.0; Data Source = d:/database/vetrina.mdb")
    
    set recset = Server.CreateObject("ADODB.Recordset")
    set recset = connessione.Execute("Select * from vetrina1")
    
    x = 0
    do while NOT recset.EOF 
    	x = x + 1
    		%>
    		<table width="144" border="1" align="left">
      		<tr> 
        	<td width="138"><div align="center"><%= recset("codice") %></div></td>
      		</tr>
      		<tr> 
        	<td><div align="center"></div></td>
      		</tr>
      		<tr> 
        	<td><%= recset("nome")&" - "& recset("descrizione") %></td>
      		</tr>
      		<tr> 
        	<td><div align="center"><%= recset("prezzo") %></div></td>
      		</tr>
    		</table>
    		<%
    		if x=5 then 
    		x = 0 
    		response.Write("
    ") 
    		end if
    	recset.Movenext
    loop
    recset.Close
    set recset = Nothing
    connessione.Close
    set connessione = Nothing
    %>
    Roby

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 © 2025 vBulletin Solutions, Inc. All rights reserved.