Re: [postmodern-devel] strange

2011-02-26 Thread Haris
 (query (sql-compile `(:insert-into 'kupci :set
 ,@(list 'vrijemeunosa (:now)

 This does not work from the repl either. You forgot a quote.

It works in repl. What quote do you mean ?

___
postmodern-devel mailing list
postmodern-devel@common-lisp.net
http://common-lisp.net/cgi-bin/mailman/listinfo/postmodern-devel


Re: [postmodern-devel] strange

2011-02-26 Thread Haris
 (query (sql-compile `(:insert-into 'kupci :set
 ,@(list 'vrijemeunosa (:now)

I put a  quote before (:now) and it works now.

Thanks

___
postmodern-devel mailing list
postmodern-devel@common-lisp.net
http://common-lisp.net/cgi-bin/mailman/listinfo/postmodern-devel


[postmodern-devel] sql-compile

2011-02-26 Thread Haris
What am I doing wrong here:

(query (sql-compile `(:update 'kupci :set
 ,@(list 'ime (parameter ime))
 :where (:= 'id (parameter id)

I get from hunchentoot log:

Database error 42883: function parameter(unknown) does not exist
No function matches the given name and argument types. You might need to add 
explicit type casts.
Query: UPDATE kupci SET ime = E'a' WHERE (id = parameter(E'id'))



___
postmodern-devel mailing list
postmodern-devel@common-lisp.net
http://common-lisp.net/cgi-bin/mailman/listinfo/postmodern-devel


Re: [postmodern-devel] sql-compile

2011-02-26 Thread Stas Boukarev
Haris fbogdano...@xnet.hr writes:

 What am I doing wrong here:

 (query (sql-compile `(:update 'kupci :set
  ,@(list 'ime (parameter ime))
  :where (:= 'id (parameter id)

 I get from hunchentoot log:

 Database error 42883: function parameter(unknown) does not exist
 No function matches the given name and argument types. You might need to add 
 explicit type casts.
 Query: UPDATE kupci SET ime = E'a' WHERE (id = parameter(E'id'))
Try
(query (sql-compile `(:update 'kupci :set
  ,@(list 'ime (parameter ime))
  :where (:= 'id ,(parameter id)
-- 
With Best Regards, Stas.

___
postmodern-devel mailing list
postmodern-devel@common-lisp.net
http://common-lisp.net/cgi-bin/mailman/listinfo/postmodern-devel