Ver Mensaje Individual
  #1 (permalink)  
Antiguo 11/07/2011, 10:57
tumbero_x
 
Fecha de Ingreso: octubre-2010
Ubicación: Buenos Aires
Mensajes: 557
Antigüedad: 14 años, 5 meses
Puntos: 4
Mostrar registros de la bd

Hola amigos
estoy con un inconveniente , estoy haciendo una consulta a la bd con php
y voy llenando una tabla html ,el problema es que tarda bastante tiempo en llenarse la tabla y son solamente 2500 registros
existe la forma de acelerar la consulta?
mi codigo es este
Código PHP:
Ver original
  1. <?php
  2. require_once('class/class.php');
  3. $sql="SELECT * FROM articulos";
  4. $res=mysql_query($sql,Conectar::con());
  5. ?>
  6. <table cellpadding="0" cellspacing="0" border="1" class="display" id="example" >
  7.     <thead >
  8.         <tr>
  9.             <th>N° Compra</th>
  10.             <th>Proveedor</th>
  11.             <th>N° Comprobante</th>
  12.             <th>Moneda</th>
  13.             <th>Cotizacion</th>
  14.            
  15.         </tr>
  16.     </thead>
  17.  
  18.  
  19.     <tbody>
  20.     <?php
  21. while($row=mysql_fetch_array($res))
  22. {
  23.  
  24.   echo  '<tr>';
  25.    
  26.   echo      '<td>'.  $row['articulo_id'].'</td>';
  27.   echo      '<td>'.  $row['descripcion'].'</td>';
  28.   echo      '<td>'.  $row['detalle'].'-'. $row['compra_num_com'].'</td>';
  29.   echo      '<td>'.  $row['proce'].'</td>';
  30.   echo      '<td>'.  $row['moneda'].'</td>';
  31.  
  32.        
  33.    echo  '</tr>';
  34.    
  35. }
  36.  
  37. ?>    
  38.     </tbody>
  39.  
  40. </table
Muchas gracias