Support Forums

Editing the database

This is a discussion on Editing the database within the Technical Support forums, part of the Technical Support Forums category; I have a test environment on my server, and I copied the database over from my site when there were ...


Go Back   68 Classifieds Forums > Technical Support Forums > Technical Support

This topic is resolved.

If you have a similar issue that this thread does not address, open a new related support topic.

 
Thread Tools Display Modes
Old 07-01-2008, 05:14 PM   #1
Senior Member
 
Join Date: Jun 2007
Posts: 110
Rep Power: 17
crystal is on a distinguished road
Question Editing the database

I have a test environment on my server, and I copied the database over from my site when there were about 100 members or so. The test system just started sending out expire notices... and they are going to the customers! How do I change all of the email addresses in the database to 'null' or to a test email? I would like to do this directly in the mysql database tables, but I'm a complete noob when it comes to databases. I am using PHPmyadmin.

Thank you for any help!
__________________
Crystal
v4.0.8 Dev
crystal is offline  
Old 07-02-2008, 07:57 PM   #2
68 Evangelist & Developer
 
 
Join Date: Jan 2007
Location: Pennsylvania, USA
Posts: 2,064
Rep Power: 61
Mike-N-Tosh is just really nice Mike-N-Tosh is just really nice
Default

Do an export in "CSV" (Comma Separated Values) for your users table. (If you have Excel, you can do an excel export.) and choose the option to save a file to your computer. Name it appropriately. You can then edit the file with any text editor or Excel if you have that.

To do it properly, you will need to make sure that you have a list of each field (column) in the order that they are in the table. Then simply delete each email address or replace it with "NULL". Save the file after editing.

Go back to your phpMyAdmin and select the table. Choose "import". From the next window, click the from file option and choose your edited file. Also choose to replace data. This will delete your data and then import your new data.
MAKE SURE YOU HAVE A BACKUP OF YOUR TABLE BEFORE DOING ANY MODIFICATIONS!!!

Hope that helps!
-Mike
__________________
Mike-N-Tosh
IndianaPC.org - A community website (v3.1.10 Developer - heavily modified & used as the CMS)
Sandbox [localhost(v3.1.10, v4.0.9, 4.1.10,4.2)] for development and customization
Visit My blog: reviews, tips, tricks, tutorials and my store with Templates, Mods & Docs
Web Hosting | Web Design & Development | 68 Classifieds Customizations
I am not a 68C employee, just a user and try to help out
Mike-N-Tosh is offline  
Old 07-02-2008, 08:20 PM   #3
curmudgeon
 
Join Date: Mar 2006
Posts: 5,343
Rep Power: 132
Lhotch is a glorious beacon of light Lhotch is a glorious beacon of light Lhotch is a glorious beacon of light
Default

You should be able to change them all with a single query like....

UPDATE class_users SET email = NULL;

I cant be any more specific since I dont use phpmyadmin.
__________________
Larry

Knowledge learned is more valuable than knowledge given.
Lhotch is offline  
Closed Thread

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Database Issue teg Technical Support 9 03-07-2008 10:21 AM


All times are GMT -4. The time now is 09:27 PM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2011, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0