Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

mySQL Triggers

  • 04-01-2007 4:03pm
    #1
    Registered Users, Registered Users 2 Posts: 1,991 ✭✭✭


    Just looking into triggers in mySQL, i know the basic layout of a trigger:
    CREATE TRIGGER ins_sum BEFORE INSERT ON account
    FOR EACH ROW SET @sum = @sum + NEW.amount;
    
    But what im wondering is it possible to get a trigger to erase a tables contents ever say 10 minutes or ever hour?
    Would i need to use a stored procedure?


Comments

  • Registered Users, Registered Users 2 Posts: 32,136 ✭✭✭✭is_that_so


    Have you considered event scheduling?


  • Registered Users, Registered Users 2 Posts: 1,991 ✭✭✭Ziycon


    Never knew these existed, i'll look into it, thanks!


  • Registered Users, Registered Users 2 Posts: 1,991 ✭✭✭Ziycon


    Just checked it out, support for Event Scheduler is only from 5.1.6 my hosting is using only 5.0.24, which im upgrading to tonight from 4.1.21!


Advertisement