Simple relation Bootstrap 4.5 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 | Gerard2 | Bonduraaaaaaa | NYC | View Edit Remove |
2 | Anthony8 | Bow | San Francisco | View Edit Remove |
3 | Leslie | Jennings | Tokyo | View Edit Remove |
4 | Leslie | Thompson | San Francisco | View Edit Remove |
5 | Julie | Firrelli | Boston | View Edit Remove |
6 | Steve | Patterson | Boston | View Edit Remove |
7 | Foon Yue | Tseng | View Edit Remove | |
8 | George N | Vanauf | NYC | View Edit Remove |
9 | Loui | Bondur | Paris | View Edit Remove |
10 | Gerard | Hernandez | Paris | View Edit Remove |