Answers.Body: <p>Check this section on the wiki: <a href="https://wiki.civicrm.org/confluence/display/CRMDOC/Create+a+Module+Extension#CreateaModuleExtension-Addadatabaseupgrader/Installer/uninstaller" rel="nofollow">https://wiki.civicrm.org/confluence/display/CRMDOC/Create+a+Module+Extension#CreateaModuleExtension-Addadatabaseupgrader/Installer/uninstaller</a>
  You will need to add an upgrader to your extension, and from that upgrader you can manage your database file installs. Also, you might want to add a DAO class?</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-04-21T16:52:50.813Z
Answers.Text: Thank's ErickH, I had already read that section and I'm able to create/destroy my table on the DB and I made some web forms.
  My problem Is now how to create: 1) a table element list  page with buttons Add, Modify ... 2) an edit form. There are some examples or maybe a some code page I can use to start?
Answers.UserDisplayName: marcello
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-04-21T16:54:07.760Z
Answers.Text: Can I avoid to create a DAO class?
Answers.UserDisplayName: marcello
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-04-23T13:23:01.060Z
Answers.Text: You certainly can, but it might make life easier if you do. It depends on what you want to do with your table. If I want to use it in a form and page etc. having a DAO actually helps me.
Answers.UserDisplayName: ErikH - CiviCooP
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-04-21T09:58:43.680Z
Answers.LastActivityDate: 2016-04-21T09:58:43.680Z
Answers.UserDisplayName: ErikH - CiviCooP
Body: <p>In my extension (it's the first one I'm writing) I have the need to create a new DB table and to manage it (insert, update, delete records).
  How can I do it?
  Thanks
  Marcello</p>
  
Tags: <extension>
Title: Create and manage a custon table in an extension: How to
ThreadText: # Create and manage a custon table in an extension: How to
  
  (Asked by: username_0 on 2016-04-21)
  
  In my extension (it's the first one I'm writing) I have the need to create a new DB table and to manage it (insert, update, delete records).
  How can I do it?
  Thanks
  username_0
  
  **Tags:** extension
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2016-04-21. Score: 3
  
  Check this section on the wiki: <https://wiki.civicrm.org/confluence/display/CRMDOC/Create+a+Module+Extension#CreateaModuleExtension-Addadatabaseupgrader/Installer/uninstaller>
  You will need to add an upgrader to your extension, and from that upgrader you can manage your database file installs. Also, you might want to add a DAO class?
  
  > **Comments:**
  > **username_0**: Thank's ErickH, I had already read that section and I'm able to create/destroy my table on the DB and I made some web forms. My problem Is now how to create: 1) a table element list  page with buttons Add, Modify ... 2) an edit form. There are some examples or maybe a some code page I can use to start?  
  > **username_0**: Can I avoid to create a DAO class?  
  > **username_1**: You certainly can, but it might make life easier if you do. It depends on what you want to do with your table. If I want to use it in a form and page etc. having a DAO actually helps me.  
  
  ---
  
  