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 
110310103 2003-01-29 00:00:00, 10108 2003-03-03…Nantes
211210103 2003-01-29 00:00:00, 10105 2003-02-11…Las Vegas
311410101 2003-01-09 00:00:00, 10102 2003-01-10…Melbourne
411910309 2004-10-15 00:00:00, 10311 2004-10-16…Nantes
512110392 2005-03-10 00:00:00, 10393 2005-03-11…Stavern
612410100 2003-01-06 00:00:00, 10101 2003-01-09…San Rafael
712510100 2003-01-06 00:00:00, 10101 2003-01-09…Warszawa
812810100 2003-01-06 00:00:00, 10101 2003-01-09…Frankfurt
912910116 2003-04-11 00:00:00San Francisco
1013110424 2005-05-31 00:00:00NYC
Add Export into CSV PrintSearch

 
Buy it nowfor only $13