mirror of
https://github.com/JanGross/quicknotes.git
synced 2025-12-01 07:37:18 +01:00
Fix create, delete and drop orphan tags
This commit is contained in:
@@ -43,4 +43,9 @@ class TagMapper extends Mapper {
|
||||
return true;
|
||||
}
|
||||
|
||||
public function dropOld () {
|
||||
$sql = 'DELETE FROM *PREFIX*quicknotes_tags WHERE ';
|
||||
$sql.= 'id NOT IN (SELECT tag_id FROM *PREFIX*quicknotes_note_tags)';
|
||||
return $this->execute($sql, []);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user