⚠ 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



pochtaliot
  • profile picture
  • Member

Posted 10 August 2017 - 19:02 PM

Hi, i have an issue with set relation method

 

I have tables: departments, directions, positions, employees. Additionally i have aggregation table employee_department where i'm adding new employee based on prev dictionaries.

 

Now, i have a table were admins assigning to employee_department record id. I want to relate and concatenate department, direction, position and name of the record in employee_department table. But those values are in dictionaries, in employee_department i have only it's ids. Can i do something like this?

 

This gives my only the ids of employee_department record. And want to get its name or title values from related dictionaries

$crud->set_relation('id_ed','employee_department','{id_employee}-{ed_id_dep}-{ed_id_jobdir}-{ed_id_pos}');