[DB-SIG] One last quick question
M.-A. Lemburg
mal@lemburg.com
Fri, 24 Mar 2000 09:41:12 +0100
Sam Gendler wrote:
>
> How does one use the Timestamp() function, that is supposed to be supplied by a dbi
> 2.0 compliant module, when executing an INSERT query.
>
> I have the (year,month,day,hour,minute,second) tuple, but how do I construct the
> INSERT query such that the query gets constructed correctly.
>
> Currently, I am just building a string manually and inserting it into the query
> string with the % operator.
Normal usage is via bound parameters, e.g.
c.execute("insert into ... values (?,?,?)",Timestamp(2000,03,24,9,40,0))
--
Marc-Andre Lemburg
______________________________________________________________________
Business: http://www.lemburg.com/
Python Pages: http://www.lemburg.com/python/