PHP开发实例大全(提高卷) 中文完整pdf扫描版[244MB]
foreach ($userIds as $key=>$value){ foreach ($roleIds as $key2=>$value2){ $dataList[] = array('user_id'=>$value,'role_id'=>$value2); } } // 批量添加数据 $result=$UserRole->addAll($dataList);
转载请注明:谷谷点程序 » ThinkPHP中的批量操作
foreach ($userIds as $key=>$value){ foreach ($roleIds as $key2=>$value2){ $dataList[] = array('user_id'=>$value,'role_id'=>$value2); } } // 批量添加数据 $result=$UserRole->addAll($dataList);
转载请注明:谷谷点程序 » ThinkPHP中的批量操作