Файл: test.php
Строк: 5
<?
require_once 'inc/start_sess.php';
$x=mysql_query("SELECT * FROM `Grey_Forest` WHERE `tree_1` > '0'");
while($ku=mysql_fetch_array($x)){
$time=time();
mysql_query("UPDATE `kolhoz_user` SET `ruby` = `ruby` + '100000' WHERE `id` = '$ku[id_user]'");
}
$x=mysql_query("SELECT * FROM `Grey_Forest` WHERE `tree_2` > '0'");
while($ku=mysql_fetch_array($x)){
$time=time();
mysql_query("UPDATE `kolhoz_user` SET `money` = `money` + '900000000' WHERE `id` = '$ku[id_user]'");
}
$x=mysql_query("SELECT * FROM `Grey_Forest` WHERE `tree_4` > '0'");
while($ku=mysql_fetch_array($x)){
$time=time();
mysql_query("UPDATE `kolhoz_user` SET `euro` = `euro` + '200' WHERE `id` = '$ku[id_user]'");
}
$x=mysql_query("SELECT * FROM `Grey_Forest` WHERE `tree_3` > '0'");
while($ku=mysql_fetch_array($x)){
$time=time();
mysql_query("UPDATE `kolhoz_user` SET `zkl` = `zkl` + '20' WHERE `id` = '$ku[id_user]'");
}
?>