Table Join
Allows you to join other tables. Only INNER JOIN supported. Keys in all joined tables must exist and be unique.
public function table_join() { $xcrud = get_xcrud(); $xcrud->table('employees'); $xcrud->join('officeCode','offices','officeCode'); // ... INNER JOIN offices ON employees.officeCode = offices.officeCode ... //this line loads the <script> below it from a view $data['script'] = view('scripts', ['code' => 'table_join']); <script> $(document).ready(function() { $(".xcrud-list").tableHeadFixer({"head" : false, "left" : 2}); }); </script> $data['content'] = $xcrud->render(); return view('demos', $data); }
Employees
# | Lastname | Firstname | Extension | Officecode | Reportsto | Jobtitle | City | Phone | Addressline1 | Addressline2 | State | Country | Postalcode | Territory | Ordering | ||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | MUrr | DianeCC | 123 | ty89cvcvthyht@hh.com | 2 | 855 | President6 | Boston | +1 215 837 0825 | 1550 Court Place | Suite 102 | MA | USA | 02107 | NA | 1 | |
2 | Gerard | Martin | x2312 | ty89cvcvthyht@hh.com | 4 | Sales Rep | Paris | +33 14 723 4404 | 43 Rue Jouffroy D'abbans | France | 75017 | EMEA | 4 | ||||
3 | Chieni5 | Patrick | fgjhj | pchieni@gmail.com | 4 | VP Marketing | Paris | +33 14 723 4404 | 43 Rue Jouffroy D'abbans | France | 75017 | EMEA | 4 | ||||
4 | Ygy | Ggg | Fgbj7@hj.com | 1 | 5 | Ff | San Francisco | +1 650 219 4782 | 100 Market Street | Suite 300 | CA | USA | 94080 | NA | 0 | ||
5 | DARA2 | DATRATRE | TANTA | dara@gmail.com | 5 | 454 | GIGIONE | Tokyo | +81 33 224 5000 | 4-1 Kioicho | Chiyoda-Ku | Japan | 102-8578 | Japan | 2 |