Taku Posted February 19, 2013 Share Posted February 19, 2013 (edited) I wanted to create a table that is based on the values inside another table example: table emp id emp 1 sec 2 pres what I want is when I add another data there it will auto create a table for them Hope someone can help tnx! Edited February 19, 2013 by Taku Quote Link to comment Share on other sites More sharing options...
Taku Posted February 19, 2013 Author Share Posted February 19, 2013 (edited) sorry for double post I cant edit the one above what I want to happen is auto-create a table that has a name based on the column emp... or when a user entered a data.. it will auto-create a table for that data Edited February 19, 2013 by Taku Quote Link to comment Share on other sites More sharing options...
Barand Posted February 19, 2013 Share Posted February 19, 2013 I can't think of a worse design for a database Quote Link to comment Share on other sites More sharing options...
Taku Posted February 19, 2013 Author Share Posted February 19, 2013 is that so :c... well I think this will work wherein I as soon as the user entered a data(via textfield) I will create a table with it.. now my problem is how to view those table and add them in the page.. Quote Link to comment Share on other sites More sharing options...
Jessica Posted February 19, 2013 Share Posted February 19, 2013 You should not be dynamically creating tables. Quote Link to comment Share on other sites More sharing options...
Taku Posted February 19, 2013 Author Share Posted February 19, 2013 I see... I will ask again.. is it possible to create a table whose name will be the value that is selected in a drop down? tnx for the replies! Quote Link to comment Share on other sites More sharing options...
Jessica Posted February 19, 2013 Share Posted February 19, 2013 If you have to ask that, it's pretty much proof you shouldn't be doing it. If you describe the business logic of what you're trying to do, we can help you with the programming logic. Quote Link to comment Share on other sites More sharing options...
Taku Posted February 19, 2013 Author Share Posted February 19, 2013 well here is what I wanted to do... 1. I will choose a add function and then enter the name of that new branch 2. And then I want that branch to auto create a table after putting it in? or after pressing a button? 3. And then I want a drop down list thingy that will show all the branches, including the new one and then show its table :B yah I really need to logic on this one.. `.` tnx for replies Quote Link to comment Share on other sites More sharing options...
Jessica Posted February 19, 2013 Share Posted February 19, 2013 WHY do you want a whole new table? You should do some basic research on database design. What you just described isn't business logic, it's a workflow. Which is not useful to determine why you're trying to do something VERY BAD. Quote Link to comment Share on other sites More sharing options...
Taku Posted February 19, 2013 Author Share Posted February 19, 2013 oh sorry my apologies mam :c and I think I get what u meant now about creating a new table....>.< crap I will do that now, gonna go back here again >.< tnx so much 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.