# I have 3 tables having deep realtionship and need to know how to save data in all tables from one view

**URL:** <https://discourse.cakephp.org/t/i-have-3-tables-having-deep-realtionship-and-need-to-know-how-to-save-data-in-all-tables-from-one-view/5567>\
**Category:** Need Help\
**Created:** [January 23, 2019, 5:14pm UTC](https://discourse.cakephp.org/t/i-have-3-tables-having-deep-realtionship-and-need-to-know-how-to-save-data-in-all-tables-from-one-view/5567 "2019-01-23T17:14:08Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![rajeshsethi](https://avatars.discourse-cdn.com/v4/letter/r/8baadc/32.png) [@rajeshsethi](https://discourse.cakephp.org/u/rajeshsethi)\
**Post date:** [January 23, 2019, 5:14pm UTC](https://discourse.cakephp.org/t/i-have-3-tables-having-deep-realtionship-and-need-to-know-how-to-save-data-in-all-tables-from-one-view/5567/1 "2019-01-23T17:14:08Z")

</div>

I have 3 tables say sales, sale\_details & sale\_more\_details. sale has many sale details, sale details belongs to sale and sale details has many sale more details and sale more details belongs to sale details.  
I wan a save related data to respective tables using the add.ctp fo sale.So, please help me in doing this task. Please treat me as newbies in cakephp 3.7. Thanks in advance to all of you.

---

<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:** [January 23, 2019, 6:11pm UTC](https://discourse.cakephp.org/t/i-have-3-tables-having-deep-realtionship-and-need-to-know-how-to-save-data-in-all-tables-from-one-view/5567/2 "2019-01-23T18:11:43Z")

</div>

Have you done the tutorial and read the manual, in particular the parts about associated records? They deal with exactly this sort of thing, and are where all newbies should start.

---

<div class="post-metadata">

**Author:** ![rajeshsethi](https://avatars.discourse-cdn.com/v4/letter/r/8baadc/32.png) [@rajeshsethi](https://discourse.cakephp.org/u/rajeshsethi)\
**Post date:** [January 24, 2019, 2:46am UTC](https://discourse.cakephp.org/t/i-have-3-tables-having-deep-realtionship-and-need-to-know-how-to-save-data-in-all-tables-from-one-view/5567/3 "2019-01-24T02:46:28Z")

</div>

Thanks.  
Please provide me the links i should refer. Also, is there any video on this topic.

---

<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:** [January 24, 2019, 4:34pm UTC](https://discourse.cakephp.org/t/i-have-3-tables-having-deep-realtionship-and-need-to-know-how-to-save-data-in-all-tables-from-one-view/5567/4 "2019-01-24T16:34:36Z")

</div>

[Here](https://book.cakephp.org/3.0/en/tutorials-and-examples.html) is the tutorial. The [tags and users](https://book.cakephp.org/3.0/en/tutorials-and-examples/cms/tags-and-users.html) section talks about associations. And [here](https://book.cakephp.org/3.0/en/orm/associations.html) is the manual section about associations.

There may well be videos about this; [here](https://google.com/) is a resource you might use to find them.

---

<div class="post-metadata">

**Author:** ![rajeshsethi](https://avatars.discourse-cdn.com/v4/letter/r/8baadc/32.png) [@rajeshsethi](https://discourse.cakephp.org/u/rajeshsethi)\
**Post date:** [January 24, 2019, 4:52pm UTC](https://discourse.cakephp.org/t/i-have-3-tables-having-deep-realtionship-and-need-to-know-how-to-save-data-in-all-tables-from-one-view/5567/5 "2019-01-24T16:52:42Z")

</div>

Thanks, I will go through it.
