//LUEGO DE LAS CONEXIONES Y TODO ESO...
// PHP + MYSQL SOBRE UBUNTU 14.04
// (...)
$registros=mysql_query("SELECT * FROM sesion WHERE (id like $idd) ORDER BY fecha DESC",$conexion) or die("Problemas en el select: ".mysql_error());
$cant=0;
echo "<br>";
while ($reg=mysql_fetch_array($registros))
{
//$reg['deuda']=0; //YA PROBE ESO Y NO CARGA LOS DATOS
//$reg['idsesion']=$cant+time();
echo "listo ".$reg['idsesion']." <br>";
$cant=$cant+1;
$ids=$cant+time();
mysql_query("update sesion set idsesion='$ids'",$reg) or
die("Problemas en el update: ".mysql_error());
}