Cod: Selectaţi tot
$cerereSQL3="SELECT * FROM users WHERE nickname='".$nickname."' ";
$rezultat3 = mysql_query($cerereSQL3);
while($rand = mysql_fetch_array($rezultat3)) {
$timp3=$rand['timp'];
$porumb=$rand['porumb'];
$wood=$rand['wood'];
$wool=$rand['wool'];
$milk=$rand['milk'];
$data_actuala=time();
$diferenta =$data_actuala-$timp3;
$xz = $diferenta+$porumb;
$query5 = mysql_query("UPDATE `users` SET `timp`=$data_actuala, porumb ='".$xz."' WHERE `nickname`='".$nickname."'");
}