Добро пожаловать, Гость!
Помош по cron на сайте - Страница 2
Помощь мастерам | Помош по cron на сайте
Shaxa :
<?php
$time = time();
$last_time = $time + 86400;
$q=mysql_query("SELECT * FROM `invest`");
while ($depo = mysql_fetch_array($q)) { if($depo['date_end_hidden']<=time()){
$pul = $depo['summa'] * $depo['foiz'];
mysql_query("UPDATE `user` SET `money` = '".($user['money']+$pul)."' WHERE `id` = '".($depo['user_id'])."'");
mysql_query("UPDATE invest SET count = count + 1, date_end_hidden = '$last_time' WHERE id = '".($depo['id'])."'");
mysql_query("SELECT * FROM invest WHERE id = '".($depo['id'])."'");
if (intval($depo['count']) >= $depo['count_full']) {mysql_query("UPDATE invest SET status = 1 WHERE id = '".($depo['id'])."'");} }
}
?>
Помош по cron на сайте
29 Окт 2018<?php
$time = time();
$last_time = $time + 86400;
$q=mysql_query("SELECT * FROM `invest`");
while ($depo = mysql_fetch_array($q)) { if($depo['date_end_hidden']<=time()){
$pul = $depo['summa'] * $depo['foiz'];
mysql_query("UPDATE `user` SET `money` = '".($user['money']+$pul)."' WHERE `id` = '".($depo['user_id'])."'");
mysql_query("UPDATE invest SET count = count + 1, date_end_hidden = '$last_time' WHERE id = '".($depo['id'])."'");
mysql_query("SELECT * FROM invest WHERE id = '".($depo['id'])."'");
if (intval($depo['count']) >= $depo['count_full']) {mysql_query("UPDATE invest SET status = 1 WHERE id = '".($depo['id'])."'");} }
}
?>
Комментарии:
kantry 30 Окт 2018
Shaxa, вот это что за колонка? $pul = $depo['summa'] * $depo['foiz'];
Её нет в таблице!
Shaxa, вот это что за колонка? $pul = $depo['summa'] * $depo['foiz'];
Её нет в таблице!
Shaxa 30 Окт 2018
Автор темы
kantry, ok
Добавлено:
kantry, вот codes в say/inc/user.php
Ni eng oxiriga buni yozasiz
<?php
$time = time();
$last_time = $time + 86400;
$q=mysql_query("SELECT * FROM `invest`");
while ($depo = mysql_fetch_array($q)) { if($depo['date_end_hidden']<=time()){
$pul = $depo['summa'] * $depo['foiz'];
mysql_query("UPDATE `user` SET `money` = '".($user['money']+$pul)."' WHERE `id` = '".($depo['user_id'])."'");
mysql_query("UPDATE invest SET count = count + 1, date_end_hidden = '$last_time' WHERE id = '".($depo['id'])."'");
mysql_query("SELECT * FROM invest WHERE id = '".($depo['id'])."'");
if (intval($depo['count']) >= $depo['count_full']) {mysql_query("UPDATE invest SET status = 1 WHERE id = '".($depo['id'])."'");} }
}
?>
Добавлено:
Bu sql
27 Окт 2018
SQL запросы
CREATE TABLE `invest` (
`id` int(10) NOT NULL AUTO_INCREMENT,
`user_id` int(12) NOT NULL,
`date_start` int(13) NOT NULL,
`date_end` int(13) NOT NULL,
`summa` float NOT NULL,
`percent` float NOT NULL,
`count` int(13) NOT NULL,
`count_full` int(13) NOT NULL,
`status` int(1) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
Добавлено:
Вот файл
tarif â ÐºÐ¾Ð¿Ð¸Ñ (3.24Kb)
Автор темы
kantry, ok
Добавлено:
kantry, вот codes в say/inc/user.php
Ni eng oxiriga buni yozasiz
<?php
$time = time();
$last_time = $time + 86400;
$q=mysql_query("SELECT * FROM `invest`");
while ($depo = mysql_fetch_array($q)) { if($depo['date_end_hidden']<=time()){
$pul = $depo['summa'] * $depo['foiz'];
mysql_query("UPDATE `user` SET `money` = '".($user['money']+$pul)."' WHERE `id` = '".($depo['user_id'])."'");
mysql_query("UPDATE invest SET count = count + 1, date_end_hidden = '$last_time' WHERE id = '".($depo['id'])."'");
mysql_query("SELECT * FROM invest WHERE id = '".($depo['id'])."'");
if (intval($depo['count']) >= $depo['count_full']) {mysql_query("UPDATE invest SET status = 1 WHERE id = '".($depo['id'])."'");} }
}
?>
Добавлено:
Bu sql
27 Окт 2018
SQL запросы
CREATE TABLE `invest` (
`id` int(10) NOT NULL AUTO_INCREMENT,
`user_id` int(12) NOT NULL,
`date_start` int(13) NOT NULL,
`date_end` int(13) NOT NULL,
`summa` float NOT NULL,
`percent` float NOT NULL,
`count` int(13) NOT NULL,
`count_full` int(13) NOT NULL,
`status` int(1) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
Добавлено:
Вот файл