Many-to-many relations Minimal 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 
110310137 2003-07-10 00:00:00Nantes
2112Las Vegas
311410102 2003-01-10 00:00:00, 10103 2003-01-29…Melbourne
4119Nantes
512110102 2003-01-10 00:00:00, 10105 2003-02-11…Stavern
612410362 2005-01-05 00:00:00San Rafael
712510287 2004-08-30 00:00:00, 10288 2004-09-01…Warszawa
812810106 2003-02-17 00:00:00Frankfurt
9129San Francisco
10131NYC
Add Export into CSV Print Search
 
Buy it nowfor only $13