DEMO SITE v1.7.14

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 
111210101 2003-01-09 00:00:00Las Vegas
211410101 2003-01-09 00:00:00, 10102 2003-01-10…Melbourne
312110101 2003-01-09 00:00:00, 10102 2003-01-10…Stavern
4124San Rafael
5125Warszawa
6128Frankfurt
7131NYC
8141Madrid
9144Luleå
10145Kobenhavn
Add Export into CSV Print
Search