Removes the old color if not used by any other note

This commit is contained in:
Matias De lellis
2016-05-26 19:15:53 -03:00
parent 6df7fc0ba8
commit f32eccab48
3 changed files with 28 additions and 11 deletions

View File

@@ -22,7 +22,7 @@ class NoteMapper extends Mapper {
}
public function colorIdCount($colorid) {
$sql = 'SELECT COUNT(*) as `count` FROM *PREFIX*quicknotes WHERE color_id = ?';
$sql = 'SELECT COUNT(*) as `count` FROM *PREFIX*quicknotes_notes WHERE color_id = ?';
$result = $this->execute($sql, [$colorid]);
$row = $result->fetch();
$result->closeCursor();