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

mySQL Triggers

Options
  • 04-01-2007 5:03pm
    #1
    Registered Users Posts: 1,987 ✭✭✭


    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 Posts: 32,136 ✭✭✭✭is_that_so


    Have you considered event scheduling?


  • Registered Users Posts: 1,987 ✭✭✭Ziycon


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


  • Registered Users Posts: 1,987 ✭✭✭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