Using sql functions

Prashant Acharekar <[email protected]>
Newsgroups gmane.lisp.clsql.general
Message-ID <[email protected]>
Hi,
I am a newbie trying out CLSQL.
I want to be able to use SQL functions like "now()" on a wall-time
field. Currently i am doing the following :

(execute-command (format  nil "INSERT INTO DATA (user_name,  email,
created_on, modified_on)
                                          VALUES ('~A', '~A',  now(),
now())" user-name email))

How can i do this using the CLSQL-READER-SYNTAX ?
Can you point me to relevant documentation, which shows how to user
inbuilt SQL functions like "now()" ? I tried CLSQL documentation, but
could not find much.

(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.

Thanks,
Prashant.
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.