Jump to content
X2Community Forums

Recommended Posts

Hello Selvamanian,

 

The easiest way to add tables to X2 is to create a new module. This creates a nice contained environment for your work where you can include the models, views, and controllers for your functionality. With the model, a database table is created automatically. Then, all of the required fields that are used internally will be added, such as Fields and Dropdowns.

 

Raymond

Link to post
Share on other sites

You can create your new table as you would ordinarily with MySQL, either command line, phpmyadmin, or the such, and if desired create a new model class in your module to use this table. You can use the existing model class in your module at protected/modules/modulename/models/Modulename.php as a reference.

 

If you plan on distributing your module, I would suggest modifying the protected/modules/modulename/data/install.sql to create this new table and populate the x2_fields table with the field metadata.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...