Jump to content


set_relation_n_n

set_relation_n_n

  • Please log in to reply
3 replies to this topic

#1 Kati

Kati

    Newbie

  • Members
  • Pip
  • 2 posts

Posted 20 January 2015 - 11:56 PM

Hello,

i need help.

 

I have a Problem related to this http://www.grocerycr...et_relation_n_n .

How can I show something from the relation table in my grid? In the example is it priority.

 

 

Thank you!

 

 

 

 

 



#2 jinbatsu

jinbatsu

    Member

  • Members
  • PipPip
  • 23 posts

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.



#3 voghDev

voghDev

    Member

  • Members
  • PipPip
  • 20 posts

Posted 30 March 2015 - 01: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!



#4 jinbatsu

jinbatsu

    Member

  • Members
  • PipPip
  • 23 posts

Posted 19 August 2015 - 05:17 PM

@Vorgdev, PRIORITY is for sorting / ordering the selected items, so that all selected records will sorted manually by end users input.







Also tagged with one or more of these keywords: set_relation_n_n

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users