Simple relation Default theme
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 | Anthonyw | dx | NYC | View Edit Remove |
2 | Leslie | Jenningsf | San Francisco | View Edit Remove |
3 | Julieettek | Firrelli | Sydney | View Edit Remove |
4 | Steve | Patterson | View Edit Remove | |
5 | Foon Yue | Tseng | View Edit Remove | |
6 | Loui | Bondur | Paris | View Edit Remove |
7 | Gerard | Hernandez | Paris | View Edit Remove |
8 | Pamela | Castillo | Paris | View Edit Remove |
9 | Larry | Bott | London | View Edit Remove |
10 | Barry | Jones | London | View Edit Remove |