a stupid question about mysql database (2)

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
php12342005
Forum Commoner
Posts: 79
Joined: Mon Mar 21, 2005 3:35 am

a stupid question about mysql database (2)

Post by php12342005 »

assume a table have data.
will the table loss data if i drop or add a field to the table (except field dropped)?

E.g. Fied UserInfo contains many user names (data), if I add or drop another field (i.e. place), does data of user names in field UserInfo loss?

Thanks
dreamline
Forum Contributor
Posts: 158
Joined: Fri May 28, 2004 2:37 am

Post by dreamline »

I've done that a couple of times and if you drop a field your other data is supposed to stay... But be4 doing any dropping i suggest you do backup your database.. :)

I always do that as a precaution.. But with phpMyAdmin i drop fields and add fields on a regular bases and sofar no data loss... :)
timvw
DevNet Master
Posts: 4897
Joined: Mon Jan 19, 2004 11:11 pm
Location: Leuven, Belgium

Post by timvw »

Post Reply