Ver Mensaje Individual
  #2 (permalink)  
Antiguo 28/07/2010, 11:53
Death_Empire
 
Fecha de Ingreso: febrero-2010
Mensajes: 818
Antigüedad: 14 años, 2 meses
Puntos: 55
Respuesta: Problema con el Select

nose como se hace directamente en sql pero yo lo haria asi
Código PHP:


<?php $sql 'SELECT * FROM torngrid_pilotos order by puntos desc';
$registros=mysql_query($sql,$conexion) or die("Problemas en el select:".mysql_error());
$i=1//primer resultado primer registro
while ($reg=mysql_fetch_assoc($registros)){ ?>
<tr>
<td class="datowars"><?php echo $i?></td>
<td class="datowars"><?php echo $reg['piloto']; ?></td>
<td class="datowars"><?php echo $reg['puntos']; ?></td>
</tr>
<?php 

     $i
++; //aumento el numero de registro
}; ?>