I fix this problem, she be Is that ID > max.
Remember i task you how me raise record? I concocted decision –>
function my_dsfg() {
$currents_users = wp_get_current_user();
global $wpdb;
$d = getdate();
$get_var_time = $wpdb->get_var("SELECT comparison FROM wp_participants_database WHERE id_private = '$currents_users->id' "); // получает больше на 1 час comparison(1)
$get_current_time = $wpdb->get_var("SELECT tametame FROM wp_participants_database WHERE id_private = '$currents_users->id' "); // получает текущее время tametame(2)
$get_max_id = $wpdb->get_var("SELECT max(id) FROM wp_participants_database "); // получает самый большой ид
$wpdb->query(" UPDATE wp_participants_database SET tametame = NOW() + INTERVAL 59 MINUTE WHERE id_private = '$currents_users->id' "); // = поле даёт текущее время
$wpdb->query(" UPDATE wp_participants_database SET id = id + '$get_max_id' WHERE id_private = '$currents_users->id' AND comparison <= NOW() "); // даёт ид + ид МАх когда время + 1 < текущего
$hfuftm = $wpdb->query(" UPDATE wp_participants_database SET comparison = NOW() + INTERVAL 1 HOUR WHERE id_private = '$currents_users->id' "); // даёт текущее + 1
}
function my_fdffg() {
$currents_users = wp_get_current_user();
global $wpdb;
$injoi = $wpdb->query(" UPDATE wp_participants_database SET toto = 60 WHERE id_private = '$currents_users->id' AND toto = 0 ");
$plot = $wpdb->get_var("SELECT min(toto) FROM wp_participants_database WHERE id_private = '$currents_users->id' ");
echo "Все ваши записи обновлены! Следущее обновление доступно через $plot минут";
}
///////////////////////////////////////////////////////////////// ЗДЕСЬ УСЛОВИЯ ОБНОВЛЕНИЯ //////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////// ЗДЕСЬ УСЛОВИЯ КРОНА /////////////////////////////////////////////////////////////////////////////////////////
function my_taming() {
$currents_users = wp_get_current_user();
global $wpdb;
$plots = $wpdb->get_var("SELECT toto FROM wp_participants_database");
if($plots <= 0)
{
$wpdb->query(" UPDATE wp_participants_database SET toto = 1");
}
}
my_taming();
function cron_qwerttrewq_ce2a6dea() {
$currents_users = wp_get_current_user();
global $wpdb;
$yuy = $wpdb->query(" UPDATE wp_participants_database SET toto = toto - 1");
}
add_action( 'qwerttrewq', 'cron_qwerttrewq_ce2a6dea', 10, 0 );
function cron_downidd_3b05c61a() {
$currents_users = wp_get_current_user();
global $wpdb;
$sda = $wpdb->query(" UPDATE wp_participants_database SET id = id / 2");
}
add_action( 'downidd', 'cron_downidd_3b05c61a', 10, 0 );
I dropped the code in case anyone needed it.