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
211210106 2003-02-17 00:00:00Las Vegas
311410102 2003-01-10 00:00:00Melbourne
411910419 2005-05-17 00:00:00Nantes
512110136 2003-07-04 00:00:00, 10137 2003-07-10…Stavern
612410395 2005-03-17 00:00:00San Rafael
712510102 2003-01-10 00:00:00, 10104 2003-01-31…Warszawa
812810106 2003-02-17 00:00:00Frankfurt
9129San Francisco
1013110103 2003-01-29 00:00:00NYC
Add Export into CSV PrintSearch

 
Buy it nowfor only $13