I'm going to guess you are using mysql.

Before starting a test, dump your database with the mysqldump command.
Edit this file to create/use your test database.
Load your test database with this file.

This is too obvious and too easy...therefore, I assume you already did this
and it did not provide what you needed.
What additional functionality are you seeking?
----- Original Message -----
From: Liam Gibbs <[EMAIL PROTECTED]>
Sent: Tuesday, April 30, 2002 8:57 AM
Subject: Re: [PHP] Database Duplication

Maybe I should explain myself a little better. Sorry
for leaving out what turned out to be crucial details.

What is happening is I want to make a test user so
that, whenever I log in with that user, I can muck up
the database and not worry about what others will see
or permanent changes.

In the past, whenever I tested the site, I had to
quickly reset any changes I'd done to the database,
which sometimes involved an hour or more of work for
hidden bugs that I ended up overlooking.

The test user (whom only I know of) is needed to test
the Web site (make sure things are being deleted as
needed, etc.). What I envisioned is that, when I log
in as 'testuser', the database will be duplicated and
I'll use that. While I'm testing my site, mucking
things up, screwing up the data, I don't have to worry
about other users coming along and seeing these
changes, because they'll be seeing the original, ,
unscrewed data (which is why I need to use a muckable,
duplicate database), making changes, etc. This way,
that hour of work I mentioned would be eliminated.

When I log out, the database is useless because it's
only really test data (with enough real-life data
already populated in the database), and so it doesn't
matter what changes users have done in the meantime.

What I may do is just duplicate the database and have
a permanent, screwable database to play with, because
that seems like less of a load on the system. I just
wanted to have up-to-date data in my screwable
database. The above method looks like a lot of
processor time, etc., so just making a permanent test
data database may be the best option, so it doesn't
have to keep recopying. I just thought I'd throw out
the question and see if it was smaller than I thought
it would be.

Do You Yahoo!?
Yahoo! Health - your guide to health and wellness

PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to