Ver Mensaje Individual
  #1 (permalink)  
Antiguo 25/05/2010, 21:16
king95
 
Fecha de Ingreso: marzo-2010
Mensajes: 26
Antigüedad: 14 años, 1 mes
Puntos: 0
Pregunta imprimir wile en tablas horizontalmente?

hola lo que estoy tratando de hacer es un WHILE en una tabla de manera que imprima unos arrays de una consulta MYSQL, la tabla tiene 2 columnas en lo cual lo que quiero hacer es imprimir los datos de una manera de izquierda es decir:

>>>>>>>>>>>>>>>en la columna 2 baja otraves a la 1
despues otra vez a la 2>>>>>>>>>>>>>> y sucecivamente

pero con el codigo que hice me imprime los datos dobles, es decir lo mismo de la columna uno lo imprime en la columna 2
les dejo el codigo:

Código PHP:
                                <table border="0" cellpadding="0" cellspacing="0">
    <?php
   
require("Connections/conexion.php");
   
mysql_select_db($database_conexion$conexion);
   
$sql "SELECT * FROM `productos` ORDER BY fecha DESC LIMIT 15";
   
$res mysql_query($sql)or die(mysql_error());
   while (
$fila mysql_fetch_array($res)){
   
?><tr>
<td align="center" width="25%"><div class="featuredIndent">

    <!-- The product name DIV. -->
        <div class="product_name">
        <a class="product_name" title="Seagate  ST31000340NS " href="<?php echo $fila['url']; ?>"><?php echo $fila[1]; ?> </a>
    </div>
        <!-- END The product name DIV. -->

    <!-- The product image DIV. -->
    <div class="product_image_container"><a title="Seagate  ST31000340NS " href="<?php echo $fila['url']; ?>"><img src="<?php  echo $fila[2]; ?>" width="160" height="120" border="0" /></a></div>
    <!-- END The product image DIV. -->
    
    <!-- The product Description DIV. -->
        <!-- END The product Description DIV. -->
    
    <!-- The product details DIV. -->

    <div class="product_details_container">
        <a class="details" title="Seagate  ST31000340NS " href="<?php echo $fila['url']; ?>">Detail</a>
    </div>
    <!-- END The product details DIV. -->
        
    <div class="clear">
        
        <!-- The product price DIV. -->
                    <div class="box_product_price"><strong>Price:</strong> 

    <span class="productPrice">

        $<?php echo $fila['Precio']; ?>            </span>


 </div>
                <!-- END The product price DIV. -->

        <div class="buttons">
    
        <!-- The add to cart DIV. -->
                <div class="product_buttons">
            <form action="http://cms.template-help.com/virtuemart_29090/index.php" method="post" name="addtocart" id="addtocart">
              <input type="submit" class="addtocart_button" value="Add to Cart" title="Add to Cart" />
            </form>
        </div>
                <!-- END The add to cart DIV. -->
        
        
        
    </div>
        
    </div>
    
        
</div></td>
<td align="center" width="25%"><div class="featuredIndent">

    <!-- The product name DIV. -->
        <div class="product_name">
        <a class="product_name" title="iWork " href="<?php echo $fila['url']; ?>"><?php echo $fila[1]; ?> </a>
    </div>
        <!-- END The product name DIV. -->

    <!-- The product image DIV. -->
    <div class="product_image_container"><a title="iWork " href="<?php echo $fila['url']; ?>"><img src="<?php  echo $fila[2]; ?>" height="120" width="160" alt="iWork " border="0" /></a></div>
    <!-- END The product image DIV. -->
    
    <!-- The product Description DIV. -->
        <!-- END The product Description DIV. -->
    
    <!-- The product details DIV. -->
    <div class="product_details_container">
        <a class="details" title="iWork " href="<?php echo $fila['url']; ?>">Detail</a>

    </div>
    <!-- END The product details DIV. -->
        
    <div class="clear">
        
        <!-- The product price DIV. -->
                    <div class="box_product_price"><strong>Price:</strong> 

    <span class="productPrice">
        $<?php echo $fila['Precio']; ?>            </span>


 </div>
                <!-- END The product price DIV. -->

        <div class="buttons">
    
        <!-- The add to cart DIV. -->
                <div class="product_buttons">
            <form action="http://cms.template-help.com/virtuemart_29090/index.php" method="post" name="addtocart" id="addtocart">
              <input type="submit" class="addtocart_button" value="Add to Cart" title="Add to Cart" />

            </form>
        </div>
                <!-- END The add to cart DIV. -->
        
        
        
    </div>
        
    </div>
    
        
</div></td>
</tr><?php ?>
</table>
AYUDAAAAAAAAAAAAAA