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 
1103Nantes
211210100 2003-01-06 00:00:00, 10101 2003-01-09…Las Vegas
311410331 2004-11-17 00:00:00, 10334 2004-11-19…Melbourne
411910334 2004-11-19 00:00:00Nantes
5121Stavern
612410100 2003-01-06 00:00:00, 10101 2003-01-09…San Rafael
712510103 2003-01-29 00:00:00, 10105 2003-02-11…Warszawa
812810100 2003-01-06 00:00:00, 10101 2003-01-09…Frankfurt
912910104 2003-01-31 00:00:00San Francisco
1013110100 2003-01-06 00:00:00, 10101 2003-01-09…NYC
Add Export into CSV PrintSearch

 
Buy it nowfor only $13