[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [17084] booking: fix delete on referenced keys
From: |
sigurdne |
Subject: |
[Fmsystem-commits] [17084] booking: fix delete on referenced keys |
Date: |
Sun, 17 Sep 2017 12:34:39 -0400 (EDT) |
Revision: 17084
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=17084
Author: sigurdne
Date: 2017-09-17 12:34:39 -0400 (Sun, 17 Sep 2017)
Log Message:
-----------
booking: fix delete on referenced keys
Modified Paths:
--------------
trunk/booking/inc/class.soallocation.inc.php
trunk/booking/inc/class.sobooking.inc.php
Modified: trunk/booking/inc/class.soallocation.inc.php
===================================================================
--- trunk/booking/inc/class.soallocation.inc.php 2017-09-17 14:00:31 UTC
(rev 17083)
+++ trunk/booking/inc/class.soallocation.inc.php 2017-09-17 16:34:39 UTC
(rev 17084)
@@ -291,6 +291,8 @@
$id = (int) $id;
$db = $this->db;
$db->transaction_begin();
+ $table_name = $this->table_name . '_cost';
+ $sql = "DELETE FROM $table_name WHERE allocation_id =
($id)";
$table_name = $this->table_name . '_resource';
$sql = "DELETE FROM $table_name WHERE allocation_id =
($id)";
$db->query($sql, __LINE__, __FILE__);
Modified: trunk/booking/inc/class.sobooking.inc.php
===================================================================
--- trunk/booking/inc/class.sobooking.inc.php 2017-09-17 14:00:31 UTC (rev
17083)
+++ trunk/booking/inc/class.sobooking.inc.php 2017-09-17 16:34:39 UTC (rev
17084)
@@ -467,6 +467,8 @@
{
$db = $this->db;
$db->transaction_begin();
+ $sql = "DELETE FROM bb_allocation_cost WHERE
allocation_id = ($id)";
+ $db->query($sql, __LINE__, __FILE__);
$sql = "DELETE FROM bb_allocation_resource WHERE
allocation_id = ($id)";
$db->query($sql, __LINE__, __FILE__);
$sql = "DELETE FROM bb_allocation WHERE id = ($id)";
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [17084] booking: fix delete on referenced keys,
sigurdne <=