ya.. probe con 4 registros
use este cod
Código PHP:
<?
$result=mysql_query("select * from anuncios ORDER BY id DESC");
$row=mysql_fetch_array($result);
$fecha_actual = date("Y" ."-". "m" ."-". "d");
while ($row=mysql_fetch_array($result))
{
if($fecha_actual == $row[fecha_expiracion]){
$la_id = $row[id];
$actualizacion = "UPDATE anuncios SET accion = 'eliminar' WHERE id = '$la_id'";
mysql_query($actualizacion);
}
?>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><?php echo $la_id; ?></td>
</tr>
</table>
<?
}
?>
lo q salio fue:
3
2
1
y falto el 4..
q puede ser?, hay alguna otra forma de hacer esto?