Re: [sqlite] Re: select date using variables in Python

2007-12-12 Thread C M
On Dec 12, 2007 1:51 PM, Dennis Cote <[EMAIL PROTECTED]> wrote: > C M wrote: > > > > Thanks to you both--using the || did the trick, and I can try the other > > approaches mentioned as well. In Python Igor's suggestion was just: > > > > amount = "+1" > > cur.execute('SELECT string, d FROM test

Re: [sqlite] Re: select date using variables in Python

2007-12-12 Thread Dennis Cote
C M wrote: Thanks to you both--using the || did the trick, and I can try the other approaches mentioned as well. In Python Igor's suggestion was just: amount = "+1" cur.execute('SELECT string, d FROM test WHERE d >= date("now", ? || ? || " days")',amount) You will might be better off

Re: [sqlite] Re: select date using variables in Python

2007-12-12 Thread C M
On Dec 12, 2007 8:20 AM, Igor Tandetnik <[EMAIL PROTECTED]> wrote: > C M <[EMAIL PROTECTED]> wrote: > > cur.execute('SELECT string FROM test WHERE d >= date("now","+1 day")') > > > > However, I'd like to make it flexible, so that a user can put in an > > amount of days forward or backward and the

[sqlite] Re: select date using variables in Python

2007-12-12 Thread Igor Tandetnik
C M <[EMAIL PROTECTED]> wrote: cur.execute('SELECT string FROM test WHERE d >= date("now","+1 day")') However, I'd like to make it flexible, so that a user can put in an amount of days forward or backward and the query will use that--basically I want the user to be able to select the date range