控制表中数据的最佳方法 [英] Best methods for Controling data in a table

查看:152
本文介绍了控制表中数据的最佳方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我想知道什么是实现目标的最佳方式

我有一个名为EscManager的表,其中包含数据userid,emailadrress和一个层

我还有一个叫用户的表

这些表由usersid链接

在GUI上,我必须显示所有用户的列表并添加一个复选框.

如果选中了用户复选框,则需要将用户添加到EscManager表中,如果选中了用户复选框并且未选中该用户,则需要从EscManager表中删除该用户

我当时正在考虑将回发添加到复选框并运行插入语句,但不确定这是否是最好的方法

我也在考虑使用保存按钮,但这是否意味着EscManager必须删除所有记录并重新插入所有记录?

请你帮忙

问候

Hi
I would like to know what would be the best way for me to achieve my goal

I have a table called EscManager that holds data userid,emailadrress and a tier

I have another table called users

the tables are linked by usersid

On the GUI the i have to show a list of all the users and add a check box.

If the user check box gets checked then the user needs to be added into the EscManager table and if the users check box is checked and gets unchecked the user needs to be removed from the EscManager table

I was thinking of adding a postback to the checkbox to and run an insert statement but not sure if this is the best way to do it

I was also thinking of using a save button, but would that mean that the EscManager would have to have all records deleted and all records re-inserted?

Please could you help

Regards

推荐答案

无需回发,您可以使用Jquery或Javas脚本

<输入type ="checkbox" id ="checkbox1d"/>

No Need to post back ,you may use Jquery or javas script

<input type="checkbox" id="checkbox1d" />


(document).ready(function(){ // 设置初始状态.
(document).ready(function() { //set initial state.


(' #checkbox1d').change(function(){ 如果(
('#checkbox1d').change(function() { if(


这篇关于控制表中数据的最佳方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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