⚠ 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

Question using set_relation



Georg Ha

Georg Ha
  • profile picture
  • Member

Posted 13 January 2013 - 11:16 AM

Hi,

my Tabel Strukture looks like this (simplified)


Event
Id, Title, DepartmentId

Departments
Id, Name, UniversityId

Universitys
Id, Name


in the Event View i want to join Departmens and Universitys in one Column so it looks like


Events
Title | Departments
'Animals' | ' Biology @ Yale'


Something like this in the set_relation


$crud->set_table('Events');
$crud->display_as('DepartmentId','Department');

$crud->set_relation('DepartmentId','Departments','{Name}, {SELECT Name JOIN Universitys ON UniversityId}');


how can this be done ?

Greetings