Akelos Framework v1 forum archive. This forum is no longer maintained. To report bugs please visit https://github.com/akelos/akelos/issues
    • CommentAuthormvitjiten
     
    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
     

    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
     
    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
     

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