Creating custom DB tables in new module

Discussion in 'Developers' Forum' started by mare, Jan 14, 2013.

  1. mare

    mare New Member

    Hello I created a new module following the basics described here (

    The docu said that all tables will be created automatically but this will result in the following error.

    mysqli_query CREATE command denied to user 'ispconfig'@'localhost' for table 'myaddon_support_messages'.

    I could ship around this with adding create right to the user [email protected] but it's confusing. So may adding a hint into the docu will be helpfull.
    laptop_user likes this.
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Thanks for the info, I will add a note in the tutorial.
  3. mare

    mare New Member

    There is also a typo in tform.php

    - $form['auth_preset']['groupid'] = 0; user
    + $form['auth_preset']['groupid'] = 0;

    and in tolist.php
    + /* Database table
    - // Datbase table
    Last edited: Jan 14, 2013
  4. bvbmedia

    bvbmedia New Member

    Another issue

    I confirm both bugs are still existing in

    Also when you make a module and you directly create a custom TPL file, ISPConfig won't create the database table on the fly. After removing the TPL file temporary and re-opening the form in the browser the CREATE table executed.
  5. till

    till Super Moderator Staff Member ISPConfig Developer

    Which exact file and line numbers do you refer to?

    Yes, thats intended.
    laptop_user likes this.
  6. laptop_user

    laptop_user Member

    Thanks, I have this same problem. Granting Create privilege solved the problem :)

Share This Page