Ver Mensaje Individual
  #3 (permalink)  
Antiguo 17/06/2010, 09:50
apuu
 
Fecha de Ingreso: abril-2010
Mensajes: 89
Antigüedad: 14 años, 1 mes
Puntos: 1
Respuesta: Actualizar sucesivamente un campo en distintos registros de una tabla

heco esto cuando borres algun comentario hace un fetch_array en un while y a todos los otros comentarios hacele un update y restale 1 al id algo asi
Código PHP:
mysql_query("UPDATE comentarios SET id = 'id - 1' where id = '".$comentario['id'] . "'"); 
$comentario['id'] es el valor recibido del while