且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

在PHP脚本中将值插入MySQL DB之前检查值是否存在

更新时间:2021-11-03 10:35:10

在您关心的字段上创建UNIQUE密钥,并在事后检测完整性错误.

Create a UNIQUE key on the fields you care about, and detect the integrity error after the fact.