Ver Mensaje Individual
  #6 (permalink)  
Antiguo 30/01/2008, 12:46
Keysher
 
Fecha de Ingreso: noviembre-2002
Mensajes: 1.341
Antigüedad: 21 años, 5 meses
Puntos: 17
Re: Posicion de un Registro

Personalmente haría algo así:

Código PHP:

function Posicion($valor$tabla){
     
$Consulta mysql_query("SELECT * FROM $tabla");
     
$i 1
     while(
$row=mysql_fetch_assoc($Consulta)){  
          if(
$row[0] == $valor)      
               break;
          
$i++; 
     }
     return 
$i;