Hi guys!
I need to do something like the 'Actors' example from here http://www.grocerycr..._a_relation_n_n. Of course, I've been reading the forum posts of the set_relation_n_n fucntion and the documentation from here http://www.grocerycr...et_relation_n_n
My doubt is about the Priority Field Relation in the Ralation Table. What is it suposed to be in that field? I see it've to be an INT(11) in the database table. But, what should be the data in that field? In the 'Actors' example, why isn't be enough with the relation between films and actors? Why not just 'film_id' and 'actor_id'? Why this 'priority' field?
Any kind of help will be appreciate. Thanks a milion.


Priority Field Relation in the set_relation_n_n function
Started by Cèsar Martí, Mar 14 2012 12:50 PM
set_relation_n_n
3 replies to this topic
#1
Posted 14 March 2012 - 12:50 PM
#2
Posted 14 March 2012 - 06:49 PM
The priority field is not a required filed. So if you want also to sort your multiple select you can do it by just adding the last segment (priority field). For example you can simply have:
The priority is if you want to have a drag-n-drop to change the priority like the image:
$crud->set_relation_n_n('actors', 'film_actor', 'actor', 'film_id', 'actor_id', 'fullname');without any problem.
The priority is if you want to have a drag-n-drop to change the priority like the image:


#3
Posted 15 March 2012 - 08:32 AM
I see. I'm gonna test it right now. Thanks Johnny.
#4
Posted 19 September 2012 - 03:13 PM
Interesting: I asked myself the same question (what is this field for). As I understood it it comes from a special use case and does add some nice funtionality (drag'n'drop to reorder the persons). But allow me the suggestion that it could be explained also in the API - maybe one time very clear for all..
Thanks,
Martin
Thanks,
Martin
Also tagged with one or more of these keywords: set_relation_n_n
Support →
Bugs / Issues →
set_relation_n_n doesn't work with custom callbacksStarted by infinitesunrise, 03 Jan 2020 ![]() |
|
![]() |
||
Support →
Grocery CRUD Enterprise →
set_relation_n_n - retrieve information from another tableStarted by lraifort, 22 Nov 2019 ![]() |
|
![]() |
||
Support →
I have a question →
two columns in set_relation_n_nStarted by Robson, 05 Oct 2016 ![]() |
|
![]() |
||
Support →
General →
help set_relation_n_nStarted by elitebook190, 29 Sep 2016 ![]() |
|
![]() |
||
Support →
I have a question →
Grocery CRUD set_relation_n_n To add multiple rows of dataStarted by Avinesh, 04 Aug 2016 ![]() |
|
![]() |
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users