DEMO SITE v1.7.24

Many-to-many relations Default theme

Many-to-many (FK) relations can be displayed as simple multiselect fields. This method changes only fk table.

HIDE CODE
<?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

Add Export into CSV Print
Search
#CustomernumberCustomer ordersCity 
1125Warszawa View Edit Remove
2128Frankfurt View Edit Remove
3129San Francisco View Edit Remove
4131NYC View Edit Remove
5141Madrid View Edit Remove
6144Luleå View Edit Remove
714510108 2003-03-01 00:00:00, 10111 2003-03-25…Kobenhavn View Edit Remove
8146Lyon View Edit Remove
9148Singapore View Edit Remove
10151NYC View Edit Remove
?>