aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthony Wang2024-01-02 23:47:57 +0000
committerAnthony Wang2024-01-02 23:47:57 +0000
commitfce879b5c56a70dc7f72381d2b36a6289b695986 (patch)
tree9e41f60a2c77d3b383f972c58698665211d3479b
parent479101f2700abf341d056432dfd9d96d269caaf9 (diff)
Capitalize SQL statements in sd-add.fish
-rw-r--r--sd-add.fish4
1 files changed, 2 insertions, 2 deletions
diff --git a/sd-add.fish b/sd-add.fish
index 1b580a6..69bb353 100644
--- a/sd-add.fish
+++ b/sd-add.fish
@@ -1,5 +1,5 @@
function sd-add
set cardfile cards
- set idx (math 1+(sqlite3 "$cardfile" "select max(idx) from cards"))
- sqlite3 "$cardfile" "insert into cards values ($idx, 256, '$argv[1]', '$argv[2]')"
+ set idx (math 1+(sqlite3 "$cardfile" "SELECT MAX(idx) FROM cards"))
+ sqlite3 "$cardfile" "INSERT INTO cards VALUES ($idx, 256, '$argv[1]', '$argv[2]')"
end