# How to add table prefix in cakephp4

**URL:** <https://discourse.cakephp.org/t/how-to-add-table-prefix-in-cakephp4/7280>\
**Category:** Need Help\
**Created:** [February 14, 2020, 8:56am UTC](https://discourse.cakephp.org/t/how-to-add-table-prefix-in-cakephp4/7280 "2020-02-14T08:56:19Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![raghu489](https://avatars.discourse-cdn.com/v4/letter/r/c67d28/32.png) [@raghu489](https://discourse.cakephp.org/u/raghu489)\
**Post date:** [February 14, 2020, 8:56am UTC](https://discourse.cakephp.org/t/how-to-add-table-prefix-in-cakephp4/7280/1 "2020-02-14T08:56:19Z")

</div>

We are developing a project in cakephp4 but we are unable to use the prefix dynamically.

we need table prefix like pm\_11\_users,pm\_12\_users  
Users are the table name, we want to add pm\_11 and pm\_12 dynamically

---

<div class="post-metadata">

**Author:** ![Zuluru](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.cakephp.org/zuluru/32/1230_2.png) [@Zuluru](https://discourse.cakephp.org/u/Zuluru)\
**Post date:** [February 14, 2020, 3:34pm UTC](https://discourse.cakephp.org/t/how-to-add-table-prefix-in-cakephp4/7280/2 "2020-02-14T15:34:10Z")

</div>

You should be able to do this by [setting the table name](https://book.cakephp.org/3/en/orm/table-objects.html#basic-usage) in the `initialize` function of your models.
