...

View Full Version : Creating mysql table at specific time



theo-savus
08-22-2010, 07:37 PM
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


$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

votter
08-22-2010, 09:21 PM
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?

theo-savus
08-22-2010, 09:32 PM
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

votter
08-22-2010, 09:38 PM
What control panel are you using? IE, Cpanel, Plesk, Webmin...

theo-savus
08-23-2010, 02:23 PM
cpanel

theo-savus
08-23-2010, 04:01 PM
i found the solution thank you very much for your help:)

for those interested it was

if (date("H")==23 && date("i")==59 && date("s")==55) {mysql_query($cerereSQL2) or die(mysql_error());}



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum