diff options
author | Anthony Wang | 2024-01-02 23:47:57 +0000 |
---|---|---|
committer | Anthony Wang | 2024-01-02 23:47:57 +0000 |
commit | fce879b5c56a70dc7f72381d2b36a6289b695986 (patch) | |
tree | 9e41f60a2c77d3b383f972c58698665211d3479b /sd-add.fish | |
parent | 479101f2700abf341d056432dfd9d96d269caaf9 (diff) |
Capitalize SQL statements in sd-add.fish
Diffstat (limited to 'sd-add.fish')
-rw-r--r-- | sd-add.fish | 4 |
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 |