所以基本上这是我的表格布局:
Type_Of Agreement
iPad Heyo! I'm an agreement!
iPod Touch I'm another agreement!
基本上,我正在构建一个管理员界面,管理员可以在其中添加新类型。我希望它能做到,这样他/她就不能输入已经存在的新类型。基本上,在上面的例子中,如果他们在新类型框中输入“iPad”并按下提交,它将被简单地忽略或抛出错误或其他东西。
这是我现有的 MySQL 语句:
INSERT IGNORE INTO agreements (Type_Of, Agreement) VALUES (?, ?)
com.Parameters.AddWithValue("", Request.Form["pies"]);
com.Parameters.AddWithValue("", "Wahey! A sample license!");