?
Solved

automated db reset question

Posted on 2011-05-08
2
Medium Priority
?
367 Views
Last Modified: 2012-06-21
Hi there,

I recently completed my first web application using PHP and MySQL.  It basically allows users to update scores and other information using a database.  I'd like to add it to my porfolio but seeing as anyone would be able to change values in that case, i'd like the database values to be reset periodically.  I'd say, every 20 minutes to an hour or so.  What's the best way to accomplish this task?

Ideally, I would only want it reset if values had changed but if that's too complicated, a clean wipe every so often would suffice.

I'm running Linux shared hosting with GoDaddy as far as server specs.

Any advice would be much appreciated.
0
Comment
Question by:duder78
2 Comments
 
LVL 23

Accepted Solution

by:
OP_Zaharin earned 2000 total points
ID: 35716943
- you can use mysql events feature to create the sql statement for the resetting task and schedule it to run periodically:

http://dev.mysql.com/doc/refman/5.1/en/events.html
http://dev.mysql.com/tech-resources/articles/mysql-events.html
0
 

Author Closing Comment

by:duder78
ID: 35717133
Exactly what I'm looking for, thanks!
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Among the most obnoxious of Exchange errors is error 1216 – Attached Database Mismatch error of the Jet Database Engine. When faced with this error, users may have to suffer from mailbox inaccessibility and in worst situations, permanent data loss.
If you try to migrate from Elastix to Issabel, you will face a lot of issues. These problems are inevitable but fortunately, you can fix them. In the guide below, I will explain how I performed the migration while keeping all data and successfully t…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

569 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question