Submit Your Article Forum Rules

Results 1 to 5 of 5

Thread: Flushing MySQL DB

  1. #1
    Senior Member
    Join Date
    Jul 2003
    Posts
    170

    Flushing MySQL DB

    Can anyone tell me how to flush a MySQL databse every hour?

    I want to put up a demo CMS so users can input data and change things, but then I want to clear all the imput data out t timed intervals?

    Thanks in advance

  2. #2
    Senior Member redcircle's Avatar
    Join Date
    Aug 2003
    Posts
    424
    keep track when it was last run if it's greater than an hour delete the data in the database. otherwise continue.
    www.squitosoft.com - PHP development site. featuring Squito Gallery. a php driven photo gallery.
    www.rgfx.net - Specializing in Internet solutions, including Html authoring, Interactive Web sites, 3D/2D Graphics and animation.

  3. #3
    Senior Member
    Join Date
    Jul 2003
    Posts
    170

    Flushing Database

    Sorry, Redcircle, I didn't explain that I wanted to do it automatically at 1 hour intervals.

  4. #4
    Senior Member redcircle's Avatar
    Join Date
    Aug 2003
    Posts
    424
    ok... doing some thinking on your problem I have a better solution. Instead of having it truncate on a set interval why not truncate at the start of every session to the CMS. That way if someone is in the middle of testing the CMS and your 1hour interval comes about then they are going to be confused. Then again if you have more than one person doing the demo they will also be confused...

    Personally instead of an hourly flush I'd do a daily flush that way people that are using the demo can get an idea of what others were trying out.

    to completely answer your question on a periodic flush you could use a cron job to flush the data every hour.
    Here's some information on another forum on the subject http://forums.devshed.com/t5948/s.html
    www.squitosoft.com - PHP development site. featuring Squito Gallery. a php driven photo gallery.
    www.rgfx.net - Specializing in Internet solutions, including Html authoring, Interactive Web sites, 3D/2D Graphics and animation.

  5. #5
    Senior Member
    Join Date
    Jul 2003
    Posts
    170

    Flush database

    Hey, Redcircle, you're the ACE man!

Similar Threads

  1. MYSQL DB creation with php and mysql command
    By ryanhouston in forum Web Programming Discussion Forum
    Replies: 2
    Last Post: 10-15-2008, 07:02 AM
  2. is php/mysql the only way to go?
    By jilly in forum eCommerce Discussion Forum
    Replies: 4
    Last Post: 09-23-2006, 01:50 PM
  3. CSV to mySQL
    By richkoi in forum Database Discussion Forum
    Replies: 14
    Last Post: 09-14-2006, 03:42 PM
  4. MySQL Bug!!!
    By TrafficProducer in forum Database Discussion Forum
    Replies: 3
    Last Post: 11-26-2005, 01:31 PM

Posting Permissions

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