+ Reply to Thread
Results 1 to 10 of 10

Thread: time to empty sql

  1. #1
    Senior Member kei_ki7 is on a distinguished road kei_ki7's Avatar
    Join Date
    Jun 2009
    Location
    Philippines
    Posts
    309
    Thanks
    10
    Thanked 3 Times in 3 Posts
    Rep Power
    2

    Default time to empty sql

    i want to empty a table when the time comes

    if time is 12:00am
    empty this_Sql
    Earn Extra Cash ONLINE !!


    Make Money Online
    Register here for FREE:






  2. #2
    Super Moderator metulj metulj's Avatar
    Join Date
    Jan 2007
    Location
    your root... now think fast... =]
    Posts
    1,066
    Thanks
    96
    Thanked 35 Times in 26 Posts
    Rep Power
    0

    Default

    Quote Originally Posted by kei_ki7
    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?

    XHTML, PHP, MySQL, CSS & more


  3. #3
    Senior Member kei_ki7 is on a distinguished road kei_ki7's Avatar
    Join Date
    Jun 2009
    Location
    Philippines
    Posts
    309
    Thanks
    10
    Thanked 3 Times in 3 Posts
    Rep Power
    2

    Default

    why? is there negative there?

    i dont know if there is.

    i just want to empty a table
    Earn Extra Cash ONLINE !!


    Make Money Online
    Register here for FREE:






  4. #4
    Senior Member Mysterio3 is on a distinguished road Mysterio3's Avatar
    Join Date
    Mar 2009
    Location
    Albania, East Europe
    Posts
    414
    Thanks
    49
    Thanked 6 Times in 6 Posts
    Rep Power
    2

    Default

    $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.

  5. #5
    Senior Member kei_ki7 is on a distinguished road kei_ki7's Avatar
    Join Date
    Jun 2009
    Location
    Philippines
    Posts
    309
    Thanks
    10
    Thanked 3 Times in 3 Posts
    Rep Power
    2

    Default

    Quote Originally Posted by Mysterio3
    $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,
    Earn Extra Cash ONLINE !!


    Make Money Online
    Register here for FREE:






  6. #6
    Senior Member blackhowk blackhowk's Avatar
    Join Date
    Jul 2006
    Location
    Bucharest
    Posts
    428
    Thanks
    0
    Thanked 1 Time in 1 Post
    Rep Power
    0

    Default

    cron job the file

  7. #7
    Senior Member kei_ki7 is on a distinguished road kei_ki7's Avatar
    Join Date
    Jun 2009
    Location
    Philippines
    Posts
    309
    Thanks
    10
    Thanked 3 Times in 3 Posts
    Rep Power
    2

    Default

    Quote Originally Posted by blackhowk
    cron job the file
    im sory mate, i cant get what you've said
    Earn Extra Cash ONLINE !!


    Make Money Online
    Register here for FREE:






  8. #8
    Senior Member kei_ki7 is on a distinguished road kei_ki7's Avatar
    Join Date
    Jun 2009
    Location
    Philippines
    Posts
    309
    Thanks
    10
    Thanked 3 Times in 3 Posts
    Rep Power
    2

    Default

    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
    Earn Extra Cash ONLINE !!


    Make Money Online
    Register here for FREE:






  9. #9
    Senior Member kei_ki7 is on a distinguished road kei_ki7's Avatar
    Join Date
    Jun 2009
    Location
    Philippines
    Posts
    309
    Thanks
    10
    Thanked 3 Times in 3 Posts
    Rep Power
    2

    Default

    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?
    Earn Extra Cash ONLINE !!


    Make Money Online
    Register here for FREE:






  10. #10
    Senior Member Mysterio3 is on a distinguished road Mysterio3's Avatar
    Join Date
    Mar 2009
    Location
    Albania, East Europe
    Posts
    414
    Thanks
    49
    Thanked 6 Times in 6 Posts
    Rep Power
    2

    Default

    Quote Originally Posted by kei_ki7
    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.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Similar Threads

  1. time
    By dominik92r in forum Coding Forum
    Replies: 5
    Last Post: 11-08-09, 17:01
  2. Time :d
    By ionutxp in forum Coding Forum
    Replies: 4
    Last Post: 26-12-08, 12:06
  3. Time Php
    By jayasanka in forum Coding Forum
    Replies: 10
    Last Post: 10-05-08, 08:44
  4. Time For Something New...
    By WhiteWarrior in forum Coding Forum
    Replies: 13
    Last Post: 06-01-08, 05:09
  5. Change Time
    By darkdesire in forum Site / Script testing and error fixing
    Replies: 3
    Last Post: 05-07-07, 13:56

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

SEO by vBSEO