Hello,
i need help.
I have a Problem related to this http://www.grocerycrud.com/documentation/options_functions/set_relation_n_n .
How can I show something from the relation table in my grid? In the example is it priority.
Thank you!
⚠ In case you've missed it, we have migrated to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This is an archived forum. ⚠
Posted 20 January 2015 - 23:56 PM
Hello,
i need help.
I have a Problem related to this http://www.grocerycrud.com/documentation/options_functions/set_relation_n_n .
How can I show something from the relation table in my grid? In the example is it priority.
Thank you!
Posted 29 January 2015 - 10:58 AM
$crud->set_relation_n_n('actors', 'film_actor', 'actor', 'film_id', 'actor_id', 'fullname','priority');
No, in the sample it show NOT the priority, but fullname.
Posted 30 March 2015 - 13:34 PM
When I read the documentation, I also had doubts in the relation_n_n example, related to the priority field.
Would be good to complete the documentation to clarify how the 'priority' field works:
- What is it; Conceptually what does PRIORITY mean when connecting FILMS with ACTORS. I think that nobody understands this clearly.
- How does the field work in the CRUD. What changes when including / excluding it in the call to $crud->set_relation_n_n(...)
- MySQL code to create the tables seen in the example (film, actor, film_actor). A lot of people (including me) is having issues when inserting the "actors" of each film. (see thread 1, thread 2, thread 3)
GroceryCRUD is great, and all the new developers that try it are falling in the same pitfall :-)
Let's keep up the good work!
Posted 19 August 2015 - 17:17 PM
@Vorgdev, PRIORITY is for sorting / ordering the selected items, so that all selected records will sorted manually by end users input.