# How to access database in module and the pages of the module

**URL:** <https://forum.shopware.com/t/how-to-access-database-in-module-and-the-pages-of-the-module/86925>\
**Category:** Shopware 6 (English)\
**Tags:** general, programming\
**Created:** [18. April 2021 um 06:56 UTC](https://forum.shopware.com/t/how-to-access-database-in-module-and-the-pages-of-the-module/86925 "2021-04-18T06:56:22Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![satvikshukla10122000](https://avatars.discourse-cdn.com/v4/letter/s/e495f1/32.png) [@satvikshukla10122000](https://forum.shopware.com/u/satvikshukla10122000)\
**Post date:** [18. April 2021 um 06:56 UTC](https://forum.shopware.com/t/how-to-access-database-in-module-and-the-pages-of-the-module/86925/1 "2021-04-18T06:56:22Z")

</div>

I am having problems as i don’t know how i can access the database or call some service from my module pages. Please help.

---

<div class="post-metadata">

**Author:** ![satvikshukla10122000](https://avatars.discourse-cdn.com/v4/letter/s/e495f1/32.png) [@satvikshukla10122000](https://forum.shopware.com/u/satvikshukla10122000)\
**Post date:** [22. April 2021 um 04:21 UTC](https://forum.shopware.com/t/how-to-access-database-in-module-and-the-pages-of-the-module/86925/3 "2021-04-22T04:21:18Z")

</div>

thanks, it helped a lot. But now i want that when i click a button on that module page it starts executing some functions of a php file. Is there a way to do it like controllers or any other way. I am a newbie so i don’t have much idea about it. Thanks
