jeeves245 Posted December 10, 2007 Share Posted December 10, 2007 Hi all, I'm hoping someone will be able to help me with this. I'm using MySQL via phpMyAdmin. At the moment I am using the following table for a resonably small database (which only contains one table): ForumUsername Email Phone Address Paid Dispatched However the table no longer suits my needs, and I can't figure out how to add/delete rows, so I am creating a new table to replace the old one. It will look like this: ForumUsername Email Address Paid Dispatched MembershipNumber Expires Could anyone tell me how I can create a query to put the information from the first table (from ForumUsername, Email, and Address) into the new table? Any help much appreciated. Cheers. Quote Link to comment https://forums.phpfreaks.com/topic/80957-solved-transfering-data-between-tables/ Share on other sites More sharing options...
trq Posted December 10, 2007 Share Posted December 10, 2007 To alter a tables structure you can use ALTER TABLE. Otherwise, to move data from one table to another you use SELECT INTO. Quote Link to comment https://forums.phpfreaks.com/topic/80957-solved-transfering-data-between-tables/#findComment-410694 Share on other sites More sharing options...
jeeves245 Posted December 10, 2007 Author Share Posted December 10, 2007 Hm the alter table stuff in that link doesn't make a lot of sense to me.. I've been searching for ages in phpMyAdmin for an easy way to do it but there doesn't seem to be an option :-\ Am I missing something? Or does a query have to be written to do it? Quote Link to comment https://forums.phpfreaks.com/topic/80957-solved-transfering-data-between-tables/#findComment-410701 Share on other sites More sharing options...
btherl Posted December 10, 2007 Share Posted December 10, 2007 You need to add/delete columns, not rows .. is that's why it's not making sense? Columns describe the format of the data, rows are actual pieces of data. Quote Link to comment https://forums.phpfreaks.com/topic/80957-solved-transfering-data-between-tables/#findComment-410815 Share on other sites More sharing options...
jeeves245 Posted December 10, 2007 Author Share Posted December 10, 2007 You need to add/delete columns, not rows .. is that's why it's not making sense? Columns describe the format of the data, rows are actual pieces of data. Oh, yeah i'm aware of that. I tried writing a query to move the data over but I can't get it to work :-X My SQL knowledge is limited. So I was just trying to find an option in phpMyAdmin to do it. There seems to be options for everything BUT that Quote Link to comment https://forums.phpfreaks.com/topic/80957-solved-transfering-data-between-tables/#findComment-410817 Share on other sites More sharing options...
rajivgonsalves Posted December 10, 2007 Share Posted December 10, 2007 You'll just have to add the additional columns to the table in phpMyAdmin, click on the table which is in the left panel, on the right side the description will come, there will be a "Add" <inputtextbox> field(s) then checkboxes at the beginning or at the end, enter 2 in the inputtextbox and at the end of the table and click on go after that enter the required fields and click on save Hope its helpful Quote Link to comment https://forums.phpfreaks.com/topic/80957-solved-transfering-data-between-tables/#findComment-410845 Share on other sites More sharing options...
jeeves245 Posted December 11, 2007 Author Share Posted December 11, 2007 Not sure how I missed that Thanks a lot. Quote Link to comment https://forums.phpfreaks.com/topic/80957-solved-transfering-data-between-tables/#findComment-411573 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.