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 | Foon Yue | Tseng | Boston | View Edit Remove |
2 | George N | Vanauf | View Edit Remove | |
3 | Loui | Bondur | Paris | View Edit Remove |
4 | Gerard | Hernandez | Paris | View Edit Remove |
5 | Pamela2 | Castillo | Paris | View Edit Remove |
6 | Larry | Bott | London | View Edit Remove |
7 | Barry | Jones | London | View Edit Remove |
8 | Andy | Fixter | Sydney | View Edit Remove |
9 | Peter | Marsh123 | Sydney | View Edit Remove |
10 | Tom | King | Sydney | View Edit Remove |