diff options
Diffstat (limited to 'core/namespace/ORM/RepositorySearch.php')
-rw-r--r-- | core/namespace/ORM/RepositorySearch.php | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/core/namespace/ORM/RepositorySearch.php b/core/namespace/ORM/RepositorySearch.php index 8a61998..aac46ef 100644 --- a/core/namespace/ORM/RepositorySearch.php +++ b/core/namespace/ORM/RepositorySearch.php @@ -24,6 +24,16 @@ trait RepositorySearch { $params[] = $filter['day']; } + if(is_numeric($filter['user'] ?? NULL)) { + $extend[] = 'user = ? AND'; + $params[] = $filter['user']; + } + + if(is_numeric($filter['category'] ?? NULL)) { + $extend[] = 'category = ? AND'; + $params[] = $filter['category']; + } + if($limit) { $limit = "LIMIT $offset,$limit"; } |