Skip to content

Commit

Permalink
Fix ip_search query
Browse files Browse the repository at this point in the history
  • Loading branch information
Shinmera committed Dec 28, 2023
1 parent dac0f86 commit 489638f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/sql/ip_search.sql
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
SELECT * FROM "lichat-ip-log"
WHERE (:ip::text IS NULL OR "ip" ~ :ip)
AND (:from::text IS NULL OR "from" ~ :from)
AND (:action::int IS NULL OR "action" ~ :action)
WHERE (:ip::text IS NULL OR "ip" = :ip)
AND (:from::text IS NULL OR "from" = :from)
AND (:action::int IS NULL OR "action" = :action)
ORDER BY "clock" DESC
LIMIT :limit
OFFSET :offset;

0 comments on commit 489638f

Please sign in to comment.