Swarfega Posted January 10, 2013 Share Posted January 10, 2013 Hey. I've only been using MySQL/PHPMyAdmin for about a week now, so I'm still kind of fragile on all of the features they provide, but I wanted to ask if there's a way to create a Query which is Run everyday at a specific time, like let's say Midnight (00:00:00) ? IE: "DELETE * FROM tablename"; <<-- Everyday at Midnight I've been looking around but found no real answers to my question. Thanks! Quote Link to comment https://forums.phpfreaks.com/topic/272961-mysqlphpmyadmin-a-timed-set-query/ Share on other sites More sharing options...
cpd Posted January 10, 2013 Share Posted January 10, 2013 You can create events in MySQL, see http://dev.mysql.com/doc/refman/5.1/en/create-event.html Quote Link to comment https://forums.phpfreaks.com/topic/272961-mysqlphpmyadmin-a-timed-set-query/#findComment-1404744 Share on other sites More sharing options...
Swarfega Posted January 10, 2013 Author Share Posted January 10, 2013 Thanks for the quick reply! My host seems to have eventscheduals disabled & only allowing 'Super' priveliges to enable/disable and/or add-new/modify events, but I'll contact them about that. Thanks again! Quote Link to comment https://forums.phpfreaks.com/topic/272961-mysqlphpmyadmin-a-timed-set-query/#findComment-1404750 Share on other sites More sharing options...
Jessica Posted January 10, 2013 Share Posted January 10, 2013 You can use a cron job. Quote Link to comment https://forums.phpfreaks.com/topic/272961-mysqlphpmyadmin-a-timed-set-query/#findComment-1404751 Share on other sites More sharing options...
fenway Posted January 13, 2013 Share Posted January 13, 2013 You can use a cron job. +1 -- events are way too fragile, and hidden. Quote Link to comment https://forums.phpfreaks.com/topic/272961-mysqlphpmyadmin-a-timed-set-query/#findComment-1405385 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.