Everyone,
If I delete a record (booking) in a list, a record in another table is also deleted. I therefore cannot use the original method to delete a record, but I placed a button for each record with the following code:
client before :
if (confirm("delete booking? ?"))
return true;
else
return false;
server :
$record = $button->getCurrentRecord();
$data = array();
$data["ID"] = $record["ID"];
$date["dat"] = $record["dat"];
if ($date <= now()) {
return false;
}
else {
DB::Delete("bookings", $data);
DB::Delete("bookinglist", $data);
}
Client after :
location.reload();
The idea is that I can only delete a record if the date of a booking is later than the current date, and that doesn't work. What is wrong in the code?