选择 10 秒前的时间
为了防止向表example提交多个表单,我想从表example中选择10秒前的最后一条数据。如果返回的结果等于1,则无法提交表单。如果返回的结果为0,则可以提交表单。
这是否可能,如果不可能,您能否建议另一种方法来阻止多个表单提交。我不想使用 cookie 方法,因为用户可以轻松阻止 cookie。
表格示例
|-----------------------------|
|user_id | content | date_time|
|-----------------------------|
|1 | content | something|
|-----------------------------|
|2 | test | something|
-----------------------------|
|3 | test | something|
------------------------------
谢谢:)
To prevent multiple form submissions to the table example, I want to select the last piece of data from the table example where it was 10 seconds ago. If the returned result is equal to 1, then they can't submit the form. If the returned result is 0 then they can submit the form.
Is this possible, if not could you suggest another method around blocking multiple form submissions. I don't want to use the cookie method, as a user could easily block cookies.
table example
|-----------------------------|
|user_id | content | date_time|
|-----------------------------|
|1 | content | something|
|-----------------------------|
|2 | test | something|
-----------------------------|
|3 | test | something|
------------------------------
Thanks :)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
目前尚不清楚您是想按用户限制还是全局限制,
如果在最后 10 秒,根据需要进行调整以满足您的目的
it is not clear if you want to limit by user or limit globally
this query will return you single row result set with bit value of
1
or0
if there was an entry in the last 10 seconds, adjust as needed to fit your purpose