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 | Martinm | Gerard | Paris | View Edit Remove |
2 | View Edit Remove | |||
3 | berthe | azert | San Francisco | View Edit Remove |
4 | pippo.dadmkmkma | 3432432kjkjkjk | Sydney | View Edit Remove |
5 | View Edit Remove | |||
6 | View Edit Remove | |||
7 | Sevilla | View Edit Remove | ||
8 | Herrera | Fausto | Sevilla | View Edit Remove |
9 | Fausto | Herrera | London | View Edit Remove |
10 | View Edit Remove |