Anki/rslib/src/search/note_due_order.sql
Abdo 9bdc8d8229
Fix sorting of due timestamps in the browser (#2840)
* Fix sorting of due timestamps in the browser

* Fix due sorting in notes mode

* Drop initial ctype sorting

* Fix new card positions being treated as due days
2023-11-24 18:31:14 +10:00

14 lines
No EOL
253 B
SQL

DROP TABLE IF EXISTS sort_order;
CREATE TEMPORARY TABLE sort_order (
pos integer PRIMARY KEY,
nid integer NOT NULL UNIQUE
);
INSERT INTO sort_order (nid)
SELECT nid
FROM cards
WHERE (
odid = 0
AND type != 0
AND queue > 0
)
GROUP BY nid