mirror of
https://github.com/rabbibotton/clog.git
synced 2025-12-06 10:40:45 -08:00
escape sql parameters in edit record
This commit is contained in:
parent
bf41f07abb
commit
db3e8fade6
1 changed files with 7 additions and 6 deletions
|
|
@ -117,7 +117,8 @@
|
||||||
(when data
|
(when data
|
||||||
(flet ((trim-last (s)
|
(flet ((trim-last (s)
|
||||||
(subseq s 0 (- (length s) 1))))
|
(subseq s 0 (- (length s) 1))))
|
||||||
(sqlite:execute-non-query
|
(apply
|
||||||
|
#'sqlite:execute-non-query
|
||||||
(db-connection app)
|
(db-connection app)
|
||||||
(format nil
|
(format nil
|
||||||
"update ~A set ~A where rowid=~A"
|
"update ~A set ~A where rowid=~A"
|
||||||
|
|
@ -127,11 +128,11 @@
|
||||||
(if (equalp "rowid"
|
(if (equalp "rowid"
|
||||||
(first l))
|
(first l))
|
||||||
""
|
""
|
||||||
(format nil "~A='~A',"
|
(format nil "~A=?,"
|
||||||
(first l)
|
(first l))))
|
||||||
(second l))))
|
|
||||||
data)))
|
data)))
|
||||||
(cadar data))))
|
(cadar data))
|
||||||
|
(mapcar #'second data))))
|
||||||
(results-window app "select changes()" :title table)))))
|
(results-window app "select changes()" :title table)))))
|
||||||
|
|
||||||
(defun on-query-tables (obj)
|
(defun on-query-tables (obj)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue