Simple relation
You can get options list from other table
HIDE CODE
<?php $xcrud = Xcrud::get_instance(); $xcrud->table('employees'); $xcrud->table_name('Simple relation'); $xcrud->relation('officeCode','offices','officeCode','city'); $xcrud->label('officeCode','Office in'); $xcrud->columns('firstName,lastName,officeCode'); $xcrud->fields('firstName,lastName,officeCode'); $xcrud->limit(10); echo $xcrud->render(); ?>
Simple relation
# | Firstname | Lastname | Office in | |
---|---|---|---|---|
1 | Jo | Firrelli2 | London | View Edit Remove |
2 | 123 | Patterson | London | View Edit Remove |
3 | Gerard2 | Bondur | NYC | View Edit Remove |
4 | Anthony8 | Bow | San Francisco | View Edit Remove |
5 | Leslie | Jennings | Tokyo | View Edit Remove |
6 | Leslie | Thompson | San Francisco | View Edit Remove |
7 | Julie | Firrelli | Boston | View Edit Remove |
8 | Steve | Patterson | Boston | View Edit Remove |
9 | Foon Yue | Tseng | View Edit Remove | |
10 | George N | Vanauf | NYC | View Edit Remove |