aboutsummaryrefslogtreecommitdiffstats
path: root/core/namespace/ORM/Repositories
diff options
context:
space:
mode:
authorThomas Lange <code@nerdmind.de>2021-07-11 15:59:06 +0200
committerThomas Lange <code@nerdmind.de>2021-07-11 16:02:42 +0200
commita47cb63afa701a5ca1ddf07d81b1c93f45fdd45d (patch)
treee941c9e592106352074113b5506a7975e1ea867e /core/namespace/ORM/Repositories
parent4a560b3813117a7a4a0aad68fa25cb740224618c (diff)
downloadblog-a47cb63afa701a5ca1ddf07d81b1c93f45fdd45d.tar.gz
blog-a47cb63afa701a5ca1ddf07d81b1c93f45fdd45d.tar.xz
blog-a47cb63afa701a5ca1ddf07d81b1c93f45fdd45d.zip
Reuse prepared statement in update method
Reuse the already defined prepared statement in the update method of the Category repository instead of creating a new one.
Diffstat (limited to 'core/namespace/ORM/Repositories')
-rw-r--r--core/namespace/ORM/Repositories/Category.php4
1 files changed, 0 insertions, 4 deletions
diff --git a/core/namespace/ORM/Repositories/Category.php b/core/namespace/ORM/Repositories/Category.php
index bd7d060..ead54a4 100644
--- a/core/namespace/ORM/Repositories/Category.php
+++ b/core/namespace/ORM/Repositories/Category.php
@@ -109,10 +109,6 @@ class Category extends Repository {
return parent::update($Entity);
}
- $query = 'SELECT parent FROM %s WHERE id = ?';
- $query = sprintf($query, static::getTableName());
-
- $Statement = $this->Database->prepare($query);
$_parent = $Entity->get('parent');
# Fetch the parent of the *new* parent category and let the while loop run through