Many-to-many relations Default theme

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

<?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 
110310100 2003-01-06 00:00:00, 10102 2003-01-10…Nantes
211210218 2004-02-09 00:00:00Las Vegas
311410100 2003-01-06 00:00:00Melbourne
411910101 2003-01-09 00:00:00, 10104 2003-01-31…Nantes
512110101 2003-01-09 00:00:00, 10102 2003-01-10…Stavern
612410356 2004-12-09 00:00:00, 10357 2004-12-10…San Rafael
712510126 2003-05-28 00:00:00Warszawa
812810100 2003-01-06 00:00:00, 10101 2003-01-09…Frankfurt
912910100 2003-01-06 00:00:00, 10104 2003-01-31…San Francisco
1013110100 2003-01-06 00:00:00, 10101 2003-01-09…NYC
Add Export into CSV PrintSearch

 
Buy it nowfor only $13