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, 10103 2003-01-29…Nantes
2112Las Vegas
3114Melbourne
4119Nantes
5121Stavern
6124San Rafael
712510178 2003-11-08 00:00:00Warszawa
812810100 2003-01-06 00:00:00Frankfurt
912910106 2003-02-17 00:00:00San Francisco
10131NYC
Add Export into CSV PrintSearch

 
Buy it nowfor only $13