验证用户是否从mysql数据库中删除记录。 [英] Validating users from deleting records from mysql database.

查看:101
本文介绍了验证用户是否从mysql数据库中删除记录。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的预订系统目前允许用户随时删除预订。系统应限制用户在预定日期前24小时的某个时间删除预订。用户应该只能在预订日期之前删除预订48。有没有办法做到这一点。



当前的sql语句



$ query1 =从预订1中删除,其中booking_id ='$ id' ;



$ results = $ mysqli->查询($ query1);


我需要
使用某些功能或某事

My booking system currently allows users to delete bookings at any time. The system should restrict the users from deleting bookings at a certain time for instance 24 hours before the booking date. Users should only be able to delete bookings 48 prior to booking date. Is there any way of doing this.

current sql statement

$query1="DELETE from bookings1 where booking_id='$id'";

$results = $mysqli->query($query1);

would i need to use some function or something

推荐答案

query1 =从预订中删除1,其中booking_id ='
query1="DELETE from bookings1 where booking_id='


id';


id'";


results =
results =


这篇关于验证用户是否从mysql数据库中删除记录。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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