473,503 Members | 1,655 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

sqlite & python 2.5

Hi,
I am using python 2.5 under windows. I am trying to do the below:

cursor.execute("SELECT postid, title, body, teaser, postdate,
posttime, author, status, format, allow_comments, notify_on_comments,
catname \
FROM ton_posts p, ton_category c \
where c.catid = p.category and status = 1 and strftime('%Y',
p.postdate) in(?) and strftime('%m', p.postdate) in(?) and c.catid
in(?)\
order by postdate desc, posttime desc",sqlvars)

print cursor.fetchall()

But it always returns empty (though there is value in db).

For ref:
sqlvars = ("select distinct strftime('%Y',postdate) from ton_posts",
"select distinct strftime('%m',postdate) from ton_posts", 'select catid
from ton_category')

Is there anyway I can find out the sql that gets executed (after the
varible substitution)?

Also can anyone help me out in finding out what is wrong here?

Thanks a lot
Joseph

Oct 14 '06 #1
0 868

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
2312
by: Pajo | last post by:
What should I install so I can connect to sqlite from Python. One simple example would be very helpfull. Thanks, Pajo
12
2455
by: John Salerno | last post by:
I've been looking around and reading, and I have a few more questions about SQLite in particular, as it relates to Python. 1. What is the current module to use for sqlite? sqlite3? or is that not...
14
2951
by: 7stud | last post by:
Does sqlite come in a mac version? Thanks.
3
3583
by: ricardo.turpino | last post by:
Hi, I've installed Mac Python 2.5. I'm running Mac OS X 10.4.10 on a Macbook 1.83GHz. I though that the python sqlite library was installed by default as part of Mac Python 2.5, however, I...
1
1527
by: mikhail.savitsky | last post by:
Hi, Official Python distro is very stable, with release cycle of around 1 year. However, to include the new version of SQLite, which has a much shorter release cycle, one has to rebuild the main...
3
1566
by: kyosohma | last post by:
Hi, I am trying to use sqlite to create a local database for an application I am writing and I am getting some screwy results from it. Basically, I have a set of values in the database and I am...
3
275
by: Daniel Fetchinson | last post by:
Does Python 2.5.2's embedded SQLite support full text searching? Sqlite itself is not distributed with python. Only a python db api compliant wrapper is part of the python stdlib and as such it...
0
1385
by: Guilherme Polo | last post by:
On Tue, Jul 1, 2008 at 9:51 PM, Joe Goldthwaite <joe@goldthwaites.comwrote: You need sqlite itself (www.sqlite.org) and bindings, pysqlite 2 (http://oss.itsystementwicklung.de/trac/pysqlite/) or...
0
2560
by: Joe Goldthwaite | last post by:
Thanks Guilherme. That helped. I guess I was thinking that pysqlite would automatically come with some version of sqlite. The fact that it doesn't is what was causing me to get the strange...
20
3946
by: timotoole | last post by:
Hi all, On a (sun) webserver that I use, there is python 2.5.1 installed. I'd like to use sqlite3 with this, however sqlite3 is not installed on the webserver. If I were able to compile sqlite...
0
7201
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7328
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6988
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7456
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5578
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5011
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3153
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1510
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
379
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.