[postmodern-devel] :set arguments
Haris
fbogdanovic at xnet.hr
Sun Feb 6 19:10:26 UTC 2011
>> (sql (:insert-into 'kupci :set (:raw (if t (sql ('ime "a"))))))
>
> The :insert-into clause expects the arguments to :set to be a multiple
> of two. You'll need to use sql-compile to do this.
>
> (sql-compile `(:insert-into 'kupci :set ,@(when t (list 'ime "a"))))
How do I do it if I have multiple IFs like:
(sql-compile `(:insert-into 'kupci :set ,@((if TEST (list 'ime "a")
(if TEST2 (list 'prezime "b")))))
or how ?
For every field in a database I want to test is even something entered and
add that pair of field name and a value to the list.
How do I do that ?
More information about the postmodern-devel
mailing list