Ver Mensaje Individual
  #2 (permalink)  
Antiguo 07/08/2005, 15:02
phpman
 
Fecha de Ingreso: julio-2005
Ubicación: España
Mensajes: 91
Antigüedad: 18 años, 9 meses
Puntos: 0
primero tendras q saber cuantas lecturas tenias en la base de datos no??

$res=mysql_query("select lecturas from noticias where id='$_GET[id]'",$connect);
$lecturas=mysql_fetch_array($res);
$numlecturas=$lecturas[lecturas]++;
mysql_query("UPDATE noticia SET lecturas='$numlecturas' WHERE id='$_GET[id]' LIMIT 1 ");