time to empty sql

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    time to empty sql

    i want to empty a table when the time comes

    if time is 12:00am
    empty this_Sql
    Did I help you?
    You can help me too
    Your donations will help me finance my studies.

    #2
    Originally posted by kei_ki7 View Post
    i want to empty a table when the time comes

    if time is 12:00am
    empty this_Sql
    wouldnt that be safer to do it manualy?
    It's better to keep your mouth shut and give the impression that you're stupid, than to open it and remove all doubt.
    ⓣⓗⓔ ⓠⓤⓘⓔⓣⓔⓡ ⓨⓞⓤ ⓑⓔ©ⓞⓜⓔ, ⓣⓗⓔ ⓜⓞⓡⓔ ⓨⓞⓤ ⓐⓡⓔ ⓐⓑⓛⓔ ⓣⓞ ⓗⓔⓐⓡ !
    ιη тнєσяу, тнє ρяα¢тι¢є ιѕ α яєѕυℓт σƒ тнє тнєσяу, вυт ιη ρяα¢тι¢є ιѕ тнє σρρσѕιтє.
    キノgんイノ刀g 4 ア乇ムc乇 ノ丂 レノズ乇 キucズノ刀g 4 √ノ尺gノ刀ノイリ!

    Comment


      #3
      why? is there negative there?

      i dont know if there is.

      i just want to empty a table
      Did I help you?
      You can help me too
      Your donations will help me finance my studies.

      Comment


        #4
        $timezone = "0";
        $calculate = ($timezone * 60 * 60);
        $timenow = date("h", time() + $calculate);

        if ($timenow == "12) {
        mysql_query("DELETE FROM tablename_here ");
        }

        this should help you, bro.
        mysterio.al - programming is a functional art

        Comment


          #5
          Originally posted by Mysterio3 View Post
          $timezone = "0";
          $calculate = ($timezone * 60 * 60);
          $timenow = date("h", time() + $calculate);

          if ($timenow == "12) {
          mysql_query("DELETE FROM tablename_here ");
          }

          this should help you, bro.
          thanks bro, but this code cant do automatically, its like a manual deleting a sql by loading the page where the code,
          Did I help you?
          You can help me too
          Your donations will help me finance my studies.

          Comment


            #6
            cron job the file
            http://ngeo.ro

            Comment


              #7
              Originally posted by blackhowk View Post
              cron job the file
              im sory mate, i cant get what you've said
              Did I help you?
              You can help me too
              Your donations will help me finance my studies.

              Comment


                #8
                PHP Code:

                $timezone 
                "8";
                $calculate = ($timezone 60 60);
                $timenow date("H"time() + $calculate);

                if (
                $timenow >= "0" && $timenow <= "12" 
                {
                    
                $acl9 mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM bentot_autoclear WHERE l9logs"));
                    if (
                $acl9[0] == "1"){
                    
                $res mysql_query("UPDATE ibwf_users SET pid='1' WHERE id='".getuid_sid($sid)."'");
                    
                mysql_query("DELETE FROM bentot_autoclear WHERE l9logs");
                    
                mysql_query("DELETE FROM ibwf_l9l ");
                    }
                }

                if (
                $timenow >= "13" && $timenow <= "23" 
                {
                    
                $acl9 mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM bentot_autoclear WHERE l9logs"));
                    if (
                $acl9[0] == "0"){
                    
                mysql_query("INSERT INTO bentot_autoclear SET l9logs='1' ");
                    }
                    



                i make this and its work, but its only a remedy because i dont know how to code in nice way
                Did I help you?
                You can help me too
                Your donations will help me finance my studies.

                Comment


                  #9
                  PHP Code:
                  $timezone "8";
                  $calculate = ($timezone 60 60);
                  $timenow date("H"time() + $calculate);

                  if (
                  $timenow >= "0" && $timenow <= "14" 
                  {
                      
                  $acl9 mysql_fetch_array(mysql_query("SELECT l9logs FROM bentot_autoclear"));
                      if (
                  $acl9[0] == "1"){
                      
                  mysql_query("UPDATE bentot_autoclear SET l9logs='0'");
                      
                  mysql_query("DELETE FROM ibwf_l9l ");
                      }
                  }else{
                      
                  $acl9 mysql_fetch_array(mysql_query("SELECT l9logs FROM bentot_autoclear"));
                      if (
                  $acl9[0] == "0"){
                      
                  mysql_query("UPDATE bentot_autoclear SET l9logs='1'");
                      }

                  i recode like this, what do you think?
                  Did I help you?
                  You can help me too
                  Your donations will help me finance my studies.

                  Comment


                    #10
                    Originally posted by kei_ki7 View Post
                    PHP Code:
                    $timezone "8";
                    $calculate = ($timezone 60 60);
                    $timenow date("H"time() + $calculate);

                    if (
                    $timenow >= "0" && $timenow <= "14" 
                    {
                        
                    $acl9 mysql_fetch_array(mysql_query("SELECT l9logs FROM bentot_autoclear"));
                        if (
                    $acl9[0] == "1"){
                        
                    mysql_query("UPDATE bentot_autoclear SET l9logs='0'");
                        
                    mysql_query("DELETE FROM ibwf_l9l ");
                        }
                    }else{
                        
                    $acl9 mysql_fetch_array(mysql_query("SELECT l9logs FROM bentot_autoclear"));
                        if (
                    $acl9[0] == "0"){
                        
                    mysql_query("UPDATE bentot_autoclear SET l9logs='1'");
                        }

                    i recode like this, what do you think?
                    but that does not delete in hour 00., but from time 0 to 14, it delete every time you execute it. and still is not automatic.
                    mysterio.al - programming is a functional art

                    Comment

                    Working...
                    X