-->
Welcome, Guest
Username: Password: Remember me

TOPIC: Database access in module

Database access in module 2 months 2 weeks ago #34047

  • jaullo
  • jaullo's Avatar
  • OFFLINE
  • 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 2 months 19 hours ago #34180

  • delcroip
  • delcroip's Avatar
  • OFFLINE
  • Expert
  • Posts: 117
  • Thank you received: 24
  • Karma: 8
Hi,

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:
https://github.com/delcroip/dolibarr_page_from_SQLtable

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
br
The administrator has disabled public write access.
Time to create page: 0.063 seconds