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

#FirstnameLastnameOffice in
Actions
1aaaarrrrrddJennings2q View Edit Remove
2StevePattersonLondon View Edit Remove
3Foon YueTsengchuNYC View Edit Remove
4LouiBondurParis View Edit Remove
5GerardHernandezParis View Edit Remove
6PamelaCastilloBoston View Edit Remove
7LarryBottLondon View Edit Remove
8BarryJonesLondon View Edit Remove
9AndyFixterSydney View Edit Remove
10PeterMarshSydney View Edit Remove
Search