Priority Field Relation in the set_relation_n_n function
- Single Page
Posted 14 March 2012 - 12:50 PM
I need to do something like the 'Actors' example from here http://www.grocerycrud.com/examples/set_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.grocerycrud.com/documentation/options_functions/set_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.
Posted 14 March 2012 - 18:49 PM
$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: [attachment=66:drag-and-drop.png]
Posted 15 March 2012 - 08:32 AM
Posted 19 September 2012 - 15:13 PM
Thanks,
Martin