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



magicrivers
  • profile picture
  • Member

Posted 29 October 2012 - 08:36 AM

I have a Client, Service, Stage and Project Tables. The Project is linked to 1 client, 1 service and 1 stage (to indicate project's current stage). A service can have many stages.

My plan is to separate changing the project's stage from the rest of it's attributes (w/c are name, the linked client and service). The problem is that in the set relation part of the code

$crud->set_relation('stage_id','stage','name');

how can I make it so that only the stages w/c are linked to the project's service are the only ones displayed?

oke_cnk
  • profile picture
  • Member

Posted 31 October 2012 - 03:12 AM

hello, magicrivers..
you can check this out at http://www.grocerycrud.com/documentation/options_functions/set_relation

j-gun
  • profile picture
  • Member

Posted 06 November 2012 - 03:50 AM

@magicrivers

I'd rather to use $crud->set_model ('myown model')