Simple relation Tailwind CSS 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 | Diane | Murphys | NYC | View Edit Remove |
| 2 | Mary | Patterson | London | View Edit Remove |
| 3 | Jeff | Firrelli | London | View Edit Remove |
| 4 | 123 | Patterson | London | View Edit Remove |
| 5 | Gerard2 | Bondur | NYC | View Edit Remove |
| 6 | Anthony8 | Bow | San Francisco | View Edit Remove |
| 7 | Leslie | Jennings | Tokyo | View Edit Remove |
| 8 | Leslie | Thompson | San Francisco | View Edit Remove |
| 9 | Julie | Firrelli | Boston | View Edit Remove |
| 10 | Steve | Patterson | Boston | View Edit Remove |