Welcome, Guest
Username: Password: Remember me

TOPIC: Database access in module

Database access in module 8 months 2 weeks ago #34047

  • jaullo
  • jaullo's Avatar
  • Newcomer
  • Posts: 3
  • Karma: 0
Hi, some one can help with the steps to be able to connect and make crud operations inside a custom module for dolibarr 7 and mysql?

I readed all module development documentation but it refers to a command to build DAO class that is not provided anymore in dolibarr 7 and i dind't find any information about how to to do the same thing using module builder or custom classes in my module

Any help will be appreciated
The administrator has disabled public write access.

Database access in module 8 months 7 hours ago #34180

  • delcroip
  • delcroip's Avatar
  • Expert
  • Posts: 124
  • Thank you received: 26
  • Karma: 9

Officially there is the module builder but I find it too heavy and too limited, I have my own version of the file to generate the DAO class but also most of the pages:

You just have to copy those file in hte build folder and launch the php page from a terminal ( the page will use the db credential define in the conf.php file
 	php build_class_from_table.php llx_mytable
The administrator has disabled public write access.
Time to create page: 0.102 seconds