aboutsummaryrefslogtreecommitdiff
path: root/services/commondescriptionservice.php
diff options
context:
space:
mode:
Diffstat (limited to 'services/commondescriptionservice.php')
-rw-r--r--services/commondescriptionservice.php14
1 files changed, 14 insertions, 0 deletions
diff --git a/services/commondescriptionservice.php b/services/commondescriptionservice.php
index 0a96f74..86e0c0f 100644
--- a/services/commondescriptionservice.php
+++ b/services/commondescriptionservice.php
@@ -140,6 +140,20 @@ class CommonDescriptionService {
}
+ function deleteDescriptionsForUser($uId){
+ $query = 'DELETE FROM '. $this->getTableName() . ' WHERE uId = '. intval($uId);
+
+ $this->db->sql_transaction('begin');
+ if (!($dbresult = & $this->db->sql_query($query))) {
+ $this->db->sql_transaction('rollback');
+ message_die(GENERAL_ERROR, 'Could not delete user descriptions', '',
+ __LINE__, __FILE__, $query, $this->db);
+ return false;
+ }
+
+ return true;
+ }
+
function deleteAll() {
$query = 'TRUNCATE TABLE `'. $this->getTableName() .'`';