DEMO SITE v1.7.15

Many-to-many relations Default theme

Many-to-many (FK) relations can be displayed as simple multiselect fields. This method changes only fk table.

HIDE CODE
<?php
	$xcrud = Xcrud::get_instance();
    $xcrud->table('customers');
    $xcrud->columns('customerNumber,Customer orders,city');
    $xcrud->fk_relation('Customer orders','customerNumber','customers_orders_fk','customer_id','order_id','orders','orderNumber',array('orderNumber','orderDate'));
    echo $xcrud->render();
?>

Customers

#CustomernumberCustomer ordersCity 
1123
2129San Francisco
3131NYC
4141
5144Luleå
6145Kobenhavn
714610106 2003-02-17 00:00:00, 10107 2003-02-24…Lyon
8148Singapore
9151NYC
1015710106 2003-02-17 00:00:00, 10107 2003-02-24…Allentown
Add Export into CSV Print
Search