SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Thread: stored procedures in MySql

  1. #1
    SitePoint Evangelist
    Join Date
    Jan 2005
    Location
    bahrain
    Posts
    553
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Thumbs up stored procedures in MySql

    hi
    i want to know can i write stored procedures in MySql?
    if yes then how can i write a stored prosedure which automatically runs after every one hour and delete messages form a table which r six months old?
    its urgent plzzz.....
    regards
    phphelp

  2. #2
    SQL Consultant silver trophybronze trophy
    SitePoint Award Recipient r937's Avatar
    Join Date
    Jul 2002
    Location
    Toronto, Canada
    Posts
    38,462
    Mentioned
    35 Post(s)
    Tagged
    1 Thread(s)
    yes, you can write stored procedures in mysql version 5

    sorry, i cannot help you with writing a stored procedure that runs automatically

    but isn't every hour a bit excessive if you're deleting messages older than 6 months?

    i mean, suppose you run it at 10 o'clock, then an hour later, how many more messages are there going to be that are now 6 months old that didn't get deleted an hour ago?
    r937.com | rudy.ca | Buy my SitePoint book: Simply SQL
    "giving out my real stuffs"

  3. #3
    SitePoint Zealot
    Join Date
    Feb 2005
    Location
    UK
    Posts
    121
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You would have to create a CRON job that executes a script to run the stored procedure.

Bookmarks

Posting Permissions

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