dani33l_87 Posted January 28, 2013 Share Posted January 28, 2013 Hi, Inside the databse I have the module mn_news. How I supose to add in a nicely way a new field for the entire module mn_news with a new column isBlog TYPE small(1) and DEFAULT '0' NOT NULL". Also I want to change the value of the collumn OwnerType type enum , value to be "player" in mn_news Other thing that maybe is more complicated is that inside of the mn_news I have the column Credit with different kind of value and I want to have the same values inside the other module mn_money ,column Money. I found somenting one google but they are very different answers and I don t want to mess with the databse. Somebody can help me? Rgds. Quote Link to comment Share on other sites More sharing options...
trq Posted January 28, 2013 Share Posted January 28, 2013 Sorry, but you will need to be a lot clearer in the explanation of your problem. Quote Link to comment Share on other sites More sharing options...
dani33l_87 Posted January 28, 2013 Author Share Posted January 28, 2013 (edited) ok, I will try again... I have a database named operation Inside the databse I have two tables (modules) mn_news and mn_money For each data inside mn_news need to add a new field/column (there are also ID, NAME, etc ) isBlog that contain the TYPE small(1) with the VALUE 0 also to add a other field/collumn OwnerType type enum , value to be player The second part I also don t understand because I supose to put the same value according with some ID or something. For the moment I will try to fix the first part. Edited January 28, 2013 by dani33l_87 Quote Link to comment Share on other sites More sharing options...
trq Posted January 28, 2013 Share Posted January 28, 2013 Your still not making a lot of sense. You should never need to dynamically change your data scheme. If that is indeed what you are trying to do you are doing it wrong. Quote Link to comment Share on other sites More sharing options...
Christian F. Posted January 28, 2013 Share Posted January 28, 2013 I don't think this is dynamically changing, but rather correcting the design of the table. Just a guess though, as there's precious little information on why the OP wants to do this. Dani: You really need to read up more about MySQL and its SQL dialect. What you're looking to do is very easily done with a simple ALTER TABLE statement. However, it's also very easy to do something wrong with it, so I strongly recommend teaching yourself first using some test-data. Then, once you're comfortable enough, take a backup of the live data and test on it. Once you've confirmed the process to be working, implement it on the actual data. Quote Link to comment 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.