Not signed in (Sign In)
Welcome Guest!
Want to take part in these discussions? If you have an account, sign in now.
If you don't have an account, apply for one now.
    • CommentAuthormvitjiten
    • CommentTimeMay 14th 2008
     
    hi
    I am trying to create table dynamically.I have a form which has a textfield.User will give some name in that textfield .My idea here is while the user click the submit button then one table should be created by the name in the textfield given by the user.How could i do that.
    •  
      CommentAuthorbermi
    • CommentTimeMay 14th 2008
     

    It can be done with the installer class like:

    require_once(AK_LIB_DIR.DS.'AkInstaller.php');
    
    $Installer = new AkInstaller();
    $Installer->createTable('table_name', 'id, name, description');
    
    • CommentAuthormvitjiten
    • CommentTimeMay 15th 2008 edited
     
    thats greate.
    But where should i keep this code.Should i keep it in controller file ? If it will be stored in another controller then how and where should i call to this.
    •  
      CommentAuthorbermi
    • CommentTimeMay 17th 2008
     

    I would create a model for handling dynamic table creation (something named DynamicTableManager) and then call the DynamicTableManager::createTable from controllers.

Add your comments
    Username Password
  • Format comments as