News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

PHPMaster.com:
How I Faked Scheduled Database Dumps Without Cron
March 27, 2012 @ 11:06:05

On PHPMaster.com today there's a new tutorial about a way to simulate cron jobs to dump the contents of a database with a simple script that fires off based on the last login time of a certain user (using the MySqlDumper tool).

My program required a accurate username and password to present its features to the user, and there is one predefined user who is idle most of the time and does just two things: wipe stale database entries and restore the database when needed. According to my login procedure, each time a user successfully logs in the system automatically updates the last login date to the current date. And that was the hint I desperately needed.

A brief snippet of code is included showing how he implemented the solution - MySQL commands and parameters defined in constants and called only when the last login time is less than "today".

0 comments voice your opinion now!
cron mysqldumper tutorial last login


blog comments powered by Disqus

Similar Posts

SitePoint PHP Blog: How to Create Your Own Twitter Widget in PHP, Part 3

Stefan Mischook's Blog: PHP Video: the Zend Framework and Web 2.0

Developer.com: Creating RSS Feeds with the Zend Framework for Fun and Profit

HowTo Forge: How To Set Up A Facebook RSS Feed Reader

UncleCode.com: Install PHPUnit Manually without Pear for a Single Project


Community Events

Don't see your event here?
Let us know!


example php7 version opinion application laravel voicesoftheelephpant extension podcast introduction symfony2 community performance library interview release series framework conference api

All content copyright, 2015 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework