From fce879b5c56a70dc7f72381d2b36a6289b695986 Mon Sep 17 00:00:00 2001 From: Anthony Wang Date: Tue, 2 Jan 2024 23:47:57 +0000 Subject: Capitalize SQL statements in sd-add.fish --- sd-add.fish | 4 ++-- 1 file 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 -- cgit v1.2.3-70-g09d2