|
@@ -87,7 +87,7 @@ AND
|
|
|
SELECT name FROM sqlpage_options WHERE type = 'end'
|
|
|
)::date
|
|
|
AND
|
|
|
- t.id IN (
|
|
|
+ (t.id IN (
|
|
|
SELECT
|
|
|
transaction_id
|
|
|
FROM tags_map
|
|
@@ -100,7 +100,14 @@ AND
|
|
|
WHERE COALESCE(ot.selected, TRUE)
|
|
|
AND ot.session = sqlpage.cookie('session')
|
|
|
)
|
|
|
+ ) OR NOT EXISTS (
|
|
|
+ SELECT 1
|
|
|
+ FROM sqlpage_options ot
|
|
|
+ WHERE ot.selected IS TRUE
|
|
|
+ AND ot.session = sqlpage.cookie('session')
|
|
|
+ AND ot.type = 'tag'
|
|
|
)
|
|
|
+)
|
|
|
ORDER BY ts DESC
|
|
|
LIMIT 100);
|
|
|
SELECT * FROM sqlpage_txn;
|