⚠ 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. ⚠

  •     

profile picture

set_relation_n_n extra columns



Dexter Morgan
  • profile picture
  • Member

Posted 29 May 2013 - 15:41 PM

void set_relation_n_n( string $field_name, string $relation_table, string $selection_table, string $primary_key_alias_to_this_table, string $primary_key_alias_to_selection_table , string $title_field_selection_table [ , string $priority_field_relation ] )

 

Hi, this is the way to show the relation_n_n and I liked it...but if I want to show another column in the select list? I mean for example showing the priority_field_relation appending the content to the title_field_selection_table could be good for me...

thx a lot!

 

 


victor
  • profile picture
  • Member

Posted 29 May 2013 - 22:39 PM

maybe this topic can help your problem:

/topic/1346-set-relation-n-n-adding-extra-field/


Dexter Morgan
  • profile picture
  • Member

Posted 30 May 2013 - 07:52 AM

maybe this topic can help your problem:

/topic/1346-set-relation-n-n-adding-extra-field/

Unfortunately not.. :) my field is in the relation table :( 


davidoster
  • profile picture
  • Member

Posted 30 May 2013 - 12:38 PM

Probably the best way is to make your own model and a custom relation from there.


Dexter Morgan
  • profile picture
  • Member

Posted 30 May 2013 - 13:30 PM

Probably the best way is to make your own model and a custom relation from there.

Is there an example on line for that? I've never used a model but directly the controller...


davidoster
  • profile picture
  • Member

Posted 31 May 2013 - 05:47 AM

Check here: http://www.grocerycrud.com/documentation/options_functions/set_model

and here: http://ellislab.com/codeigniter/user-guide/general/models.html