delete votes when deleting bookmark
git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@409 b3834d28-1941-0410-a4f8-b48e95affb8f
This commit is contained in:
parent
da3c422d65
commit
9a0aefc28b
1 changed files with 6 additions and 3 deletions
|
@ -625,7 +625,8 @@ class SemanticScuttle_Service_Bookmark extends SemanticScuttle_DbService
|
||||||
{
|
{
|
||||||
$bookmark = (int)$bookmark;
|
$bookmark = (int)$bookmark;
|
||||||
|
|
||||||
$query = 'DELETE FROM ' . $GLOBALS['tableprefix'] . 'bookmarks WHERE bId = '. $bookmark;
|
$query = 'DELETE FROM ' . $GLOBALS['tableprefix'] . 'bookmarks'
|
||||||
|
. ' WHERE bId = '. $bookmark;
|
||||||
$this->db->sql_transaction('begin');
|
$this->db->sql_transaction('begin');
|
||||||
if (!($dbres = $this->db->sql_query($query))) {
|
if (!($dbres = $this->db->sql_query($query))) {
|
||||||
$this->db->sql_transaction('rollback');
|
$this->db->sql_transaction('rollback');
|
||||||
|
@ -636,7 +637,8 @@ class SemanticScuttle_Service_Bookmark extends SemanticScuttle_DbService
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$query = 'DELETE FROM ' . $GLOBALS['tableprefix'] . 'bookmarks2tags WHERE bId = '. $bookmark;
|
$query = 'DELETE FROM ' . $GLOBALS['tableprefix'] . 'bookmarks2tags'
|
||||||
|
. ' WHERE bId = '. $bookmark;
|
||||||
$this->db->sql_transaction('begin');
|
$this->db->sql_transaction('begin');
|
||||||
if (!($dbres = $this->db->sql_query($query))) {
|
if (!($dbres = $this->db->sql_query($query))) {
|
||||||
$this->db->sql_transaction('rollback');
|
$this->db->sql_transaction('rollback');
|
||||||
|
@ -647,7 +649,8 @@ class SemanticScuttle_Service_Bookmark extends SemanticScuttle_DbService
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$query = 'DELETE FROM '. $GLOBALS['tableprefix'] .'votes WHERE bid = '. $bookmark;
|
$query = 'DELETE FROM '. $GLOBALS['tableprefix'] .'votes'
|
||||||
|
. ' WHERE bid = '. $bookmark;
|
||||||
$this->db->sql_transaction('begin');
|
$this->db->sql_transaction('begin');
|
||||||
if (!($dbres = $this->db->sql_query($query))) {
|
if (!($dbres = $this->db->sql_query($query))) {
|
||||||
$this->db->sql_transaction('rollback');
|
$this->db->sql_transaction('rollback');
|
||||||
|
|
Loading…
Reference in a new issue