• Resolved gransfor

    (@gransfor)


    Help. I and other users my site no can add records. The reason is that fill form page update, but no record is added.
    This is the second time such a problem. The first time I had to reinstall the plugin and do everything from scratch, again I do not want to.
    Before this error I wrote all sorts of conditions in the theme function, but when I found that the records are not added, I immediately commented out all my code to make sure that it is not his fault, but still nothing helps

    • This topic was modified 5 years, 11 months ago by gransfor.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author xnau webdesign

    (@xnau)

    Did you mean to mark this resolved? You still having the problem?

    Thread Starter gransfor

    (@gransfor)

    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.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘no record is added’ is closed to new replies.