Re: Using sql functions

Michael Raskin <jhyiugjhvbjh234-JGs/[email protected]>
Newsgroups gmane.lisp.clsql.general
Message-ID <[email protected]>
Prashant Acharekar wrote:
> (with-database (*default-database* *db* :database-type :mysql)
>       (insert-records :into "DATA"
>                       :attributes '(user_name email created_on modified_on)
>                       :values `(,user-name ,email "now()" "now()")))
> 
> The above does not work.

Dirty hack for quick fix: try |now()|.
Explanation: it will pass symbol-name into SQL (thinking it is a
reference to a column), which yields "now()".

For a real fix you may need to extend function list (which contains at
least count)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.