Codeigniter 如何通过下拉关系字段过滤关系\n\n多选
我有四张桌子: 项目Codeigniter 如何通过下拉关系字段过滤关系\n\n多选,codeigniter,grocery-crud,Codeigniter,Grocery Crud,我有四张桌子: 项目 *item_id* vendor_id title *vendor_id* title *location_id* title vendor_id vendor_location_id priority 供应商 *item_id* vendor_id title *vendor_id* title *location_id* title vendor_id vendor_location_id priority 供应商位置 *item_id* vendor_
*item_id*
vendor_id
title
*vendor_id*
title
*location_id*
title
vendor_id
vendor_location_id
priority
供应商
*item_id*
vendor_id
title
*vendor_id*
title
*location_id*
title
vendor_id
vendor_location_id
priority
供应商位置
*item_id*
vendor_id
title
*vendor_id*
title
*location_id*
title
vendor_id
vendor_location_id
priority
供应商\供应商\地点
*item_id*
vendor_id
title
*vendor_id*
title
*location_id*
title
vendor_id
vendor_location_id
priority
这是我的控制器:
$crud->set_theme('datatables');
$crud->set_subject('Items');
$crud->set_table('items');
$crud->set_relation('vendor_id', 'vendors', 'title');
$crud->set_relation_n_n('Locations', 'items_vendor_locations', 'vendor_locations', 'item_id', 'vendor_location_id', '{location_title} {country} {city}', 'priority');
如何根据我通过供应商所做的选择筛选关系?例如:我选择vendor 30,位置仅显示vendor 30的位置,而不是所有位置。我想这是通过回调函数实现的。有人能给我举个例子或大致的指导如何做到这一点吗