Problems, need help? Have a tip or advice? Post it here.
4 posts Page 1 of 1
Hi there,
I'm asking a second question today, I'm sorry.
I created a lms system using Couch CMS. I created user and order management. The system works like this. The user registers on the site and buys the training he wants to receive. I can see the orders from the administration panel. Here's the subject I'm stuck on. I have two page users.php and training.php. And these two page have many-to-many relation.
When a user buy a training, I ad training id to relation field of users.php via db_persist.
But the problem If same user buy a second training on my website, only second training id shown in relation field of users.php
How can I solve this problem?
Also can I add more than 1 training id to relation field via db_persist?
Hi,

You want to append the new value to the already existing ids in the relation field whereas your code seems to be simply overwriting them.

For the solution, please see viewtopic.php?f=2&t=11576#p30955.

Hope this helps,
KK says and It work! Real magic :)

I know I'm tiring you but can I add more than 1 training id to relation field via db_persist KK?
can I add more than 1 training id to relation field via db_persist KK?

Sure. Separate the multiple values using comma e.g.
Code: Select all
<cms:db_persist_form
    followers="+21, 36, 49"
/>
4 posts Page 1 of 1
cron