双重进入 [英] Double entry

查看:81
本文介绍了双重进入的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Howe我可以阻止数据库中的双重输入。

用户可以将他们的数据输入到表格中。

但是如何防止双重输入。


用户可以输入姓名和日期

所以用户只能在一个日期输入他们的名字。


请帮忙。 />

解决方案

birdy写道:

我可以阻止数据库中的双重输入。
用户可以输入他们的数据到表格。
但如何防止双重进入。

用户可以输入姓名和日期
因此用户只能在一个日期输入他们的名字。

请帮助。



您好,


您可以将名称和日期字段定义为主键

表。主键是唯一的,如果你试图用相同的值添加另一个记录

,mysql会给你一个错误。


< blockquote> birdy写道:

我可以阻止数据库中的双重输入。
用户可以将他们的数据输入到表格中。
但是如何防止双重输入。 />
用户可以输入姓名和日期
因此用户只能在一个日期输入他们的名字。

请帮忙。



您好,


您可以将名称和日期字段定义为

表的主键。主键是唯一的,如果你试图用相同的值添加另一个记录

,mysql会给你一个错误。


< blockquote> birdy写道:

我可以阻止数据库中的双重输入。
用户可以将他们的数据输入到表格中。
但是如何防止双重输入。 />
用户可以输入姓名和日期
因此用户只能在一个日期输入他们的名字。

请帮忙。



您好,


您可以将名称和日期字段定义为

表的主键。主键是唯一的,如果你试图用相同的值添加另一个记录

,mysql会给你一个错误。


Howe can i prevent a double entry in a database.
Users can input their data into table.
But how to prevent a double entry.

Users can enter name and date
So users can enter their names only on one date.

Please help.

解决方案

birdy wrote:

Howe can i prevent a double entry in a database.
Users can input their data into table.
But how to prevent a double entry.

Users can enter name and date
So users can enter their names only on one date.

Please help.


Hi,

you can make define the name and date field as the primary key for the
table. the primary key is unique and if you try to add another record
with the same value, mysql will give you an error.


birdy wrote:

Howe can i prevent a double entry in a database.
Users can input their data into table.
But how to prevent a double entry.

Users can enter name and date
So users can enter their names only on one date.

Please help.


Hi,

you can make define the name and date field as the primary key for the
table. the primary key is unique and if you try to add another record
with the same value, mysql will give you an error.


birdy wrote:

Howe can i prevent a double entry in a database.
Users can input their data into table.
But how to prevent a double entry.

Users can enter name and date
So users can enter their names only on one date.

Please help.


Hi,

you can make define the name and date field as the primary key for the
table. the primary key is unique and if you try to add another record
with the same value, mysql will give you an error.


这篇关于双重进入的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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