
07/08/2005, 15:02
|
| | Fecha de Ingreso: julio-2005 Ubicación: España
Mensajes: 91
Antigüedad: 19 años, 8 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 "); |