Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    New Coder
    Join Date
    Aug 2010
    Posts
    13
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Creating mysql table at specific time

    Hello, i am trying to create a table but at a specific time, for example if it's 2 pm and 25 minutes create a table...and i can't get it to work

    here is my code
    Code:
    $cerereSQL2 = 'CREATE TABLE `' .$today2. '` (
    `id` int(11) NOT NULL auto_increment,
    `victima` text NOT NULL,
    `vorbe` text NOT NULL,PRIMARY KEY  (`id`))';
      
    if ((date("H")== 13) && (date("i") == 22) && (date("s")== 30)) 
    {mysql_query($cerereSQL2) or die(mysql_error());}

    thank you in advance

  • #2
    Regular Coder
    Join Date
    Oct 2009
    Location
    United States
    Posts
    157
    Thanks
    8
    Thanked 4 Times in 4 Posts
    Why not just use set a cron job to run every day at that specific time, to enter a table? Or are you trying to do this for each user so they can enter a table at a specific time?

  • Users who have thanked votter for this post:

    theo-savus (08-23-2010)

  • #3
    New Coder
    Join Date
    Aug 2010
    Posts
    13
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by votter View Post
    Why not just use set a cron job to run every day at that specific time, to enter a table? Or are you trying to do this for each user so they can enter a table at a specific time?
    now, i want to run it every day at a specific time, can you tell me more about this cron job? and maybe a small example would be nice thank you by the way now i know what i am looking for exactly

  • #4
    Regular Coder
    Join Date
    Oct 2009
    Location
    United States
    Posts
    157
    Thanks
    8
    Thanked 4 Times in 4 Posts
    What control panel are you using? IE, Cpanel, Plesk, Webmin...

  • #5
    New Coder
    Join Date
    Aug 2010
    Posts
    13
    Thanks
    1
    Thanked 0 Times in 0 Posts
    cpanel

  • #6
    New Coder
    Join Date
    Aug 2010
    Posts
    13
    Thanks
    1
    Thanked 0 Times in 0 Posts
    i found the solution thank you very much for your help

    for those interested it was
    Code:
    if (date("H")==23 && date("i")==59 && date("s")==55) {mysql_query($cerereSQL2) or die(mysql_error());}


  •  

    Posting Permissions

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