HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Developers' Forum (http://www.howtoforge.com/forums/forumdisplay.php?f=33)
-   -   Creating custom DB tables in new module (http://www.howtoforge.com/forums/showthread.php?t=60212)

mare 14th January 2013 10:02

Creating custom DB tables in new module
 
Hello I created a new module following the basics described here (http://docs.ispconfig.org/development/interface/)

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 ispconfig@localhost but it's confusing. So may adding a hint into the docu will be helpfull.

till 14th January 2013 14:36

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

mare 14th January 2013 15:34

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

bvbmedia 28th March 2013 21:55

Another issue
 
I confirm both bugs are still existing in 3.0.5.2.

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.

till 2nd April 2013 10:04

Quote:

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
Which exact file and line numbers do you refer to?

Quote:

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.
Yes, thats intended.


All times are GMT +2. The time now is 03:48.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.