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:
cweiske 2009-10-25 15:26:48 +00:00
parent da3c422d65
commit 9a0aefc28b

View file

@ -625,7 +625,8 @@ class SemanticScuttle_Service_Bookmark extends SemanticScuttle_DbService
{
$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');
if (!($dbres = $this->db->sql_query($query))) {
$this->db->sql_transaction('rollback');
@ -636,7 +637,8 @@ class SemanticScuttle_Service_Bookmark extends SemanticScuttle_DbService
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');
if (!($dbres = $this->db->sql_query($query))) {
$this->db->sql_transaction('rollback');
@ -647,7 +649,8 @@ class SemanticScuttle_Service_Bookmark extends SemanticScuttle_DbService
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');
if (!($dbres = $this->db->sql_query($query))) {
$this->db->sql_transaction('rollback');