如何将列表框中选择的多个项目放置到数据库中 [英] how place the multiple items selected in listbox in to the database

查看:87
本文介绍了如何将列表框中选择的多个项目放置到数据库中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我在列表框中选择了多个选项,并且只为列表框中选择的项分配了一个行,那么如何将在列表框中选择的多个项存储到sql数据库中?

if i select multiple options in listbox and i have only onerow allocated for items selected for listbox then how can store the multiple items selected in listbox into sql database

推荐答案

获取选定的项目计数并运行那么多时间.在循环内连接所有值,然后将其存储在数据库中
get the selected item count and run loop for that much time. concat all the values inside loop and thenstore in database


这篇关于如何将列表框中选择的多个项目放置到数据库中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆