Jinovich
09-04-2008, 07:39 PM
So recently I accidently executed some sql code on my db changing 600 of my users email address to "abx@xyz.com" which has messed up a few things to say the least.
Now I can't install a backup of my forums as the incident occured about a month ago, instead I have found a backup close to the time before I corrupted the user table with the original email addresses in.
I was wondering if anyone could help write some code that would,
1) Query the active user table for users with the email address "abc@xyz.com"
2) Use the user id's from the previous query to look up the original email address from the user table from the backup.
3) Copy the email address from the backup user table into the currently active user table
Doesn't have to be fancy and plugin with vB I will settle for a simple script which connects directly to the db.
Would really appreciate if someone can help me do this.
Now I can't install a backup of my forums as the incident occured about a month ago, instead I have found a backup close to the time before I corrupted the user table with the original email addresses in.
I was wondering if anyone could help write some code that would,
1) Query the active user table for users with the email address "abc@xyz.com"
2) Use the user id's from the previous query to look up the original email address from the user table from the backup.
3) Copy the email address from the backup user table into the currently active user table
Doesn't have to be fancy and plugin with vB I will settle for a simple script which connects directly to the db.
Would really appreciate if someone can help me do this.