# Number in database table name

**URL:** <https://discourse.cakephp.org/t/number-in-database-table-name/9266>\
**Category:** Uncategorized\
**Created:** [April 20, 2021, 9:19am UTC](https://discourse.cakephp.org/t/number-in-database-table-name/9266 "2021-04-20T09:19:19Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![user\_looser](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.cakephp.org/user_looser/32/2161_2.png) [@user\_looser](https://discourse.cakephp.org/u/user_looser)\
**Post date:** [April 20, 2021, 9:19am UTC](https://discourse.cakephp.org/t/number-in-database-table-name/9266/1 "2021-04-20T09:19:19Z")

</div>

Hello everybody. Has anyone of you encountered with a problem that occurs, when one use numbers in datbase table name?

Here is an example. I created table eu149393\_forms in my database. This table contains foregin key eu\_cargo\_id which refers to table eu\_cargos .

When I use console and bake all command to build the basic actions, I get various errors after trying to display any of built actions. Here is an example:

/myapp/eu14993forms/ (index action)

 ![forms index](https://canada1.discourse-cdn.com/flex029/uploads/cakephp/original/2X/d/d5f4bf6df98c0c900a347fe91a7fc2d4cbd492c7.png)

/myapp/eu14993forms/View/1

 ![view](https://canada1.discourse-cdn.com/flex029/uploads/cakephp/original/2X/1/1d9e7d0624e2380db2977dc2359e61d5867936f7.png)

Can anyone help me, please?

---

<div class="post-metadata">

**Author:** ![user\_looser](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.cakephp.org/user_looser/32/2161_2.png) [@user\_looser](https://discourse.cakephp.org/u/user_looser)\
**Post date:** [April 20, 2021, 10:45am UTC](https://discourse.cakephp.org/t/number-in-database-table-name/9266/2 "2021-04-20T10:45:02Z")

</div>

The error occurs in my CakePHP 4.2.5 for all database table names with underscore, e.g. i tried to change names to eu\_forms but the problem persists. According to CakePHP cookbook one should use underscore to name tables whose name is composed of two or more words. BUt it seems that this approach does not work …

I am not sure, if the problems cold be a result of the fact, that I use about 6 “many to many” relation tables with other tables. But these parts of my website work as expected.

---

<div class="post-metadata">

**Author:** ![spadeX](https://avatars.discourse-cdn.com/v4/letter/s/919ad9/32.png) [@spadeX](https://discourse.cakephp.org/u/spadeX)\
**Post date:** [April 23, 2021, 7:08am UTC](https://discourse.cakephp.org/t/number-in-database-table-name/9266/3 "2021-04-23T07:08:31Z")

</div>

Please read this doc.

[CakePHP conventions](https://book.cakephp.org/4/en/intro/conventions.html)
