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_comme nts,
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',p ostdate) from ton_posts",
"select distinct strftime('%m',p ostdate) 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 0 873 This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
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
|
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
out until Python 2.5?
2. What's the difference between sqlite and pysqlite? Do you need both,
just one, or is one an older version of the same thing?
3. What's the difference between the command line program called sqlite3
|
by: 7stud |
last post by:
Does sqlite come in a mac version?
Thanks.
|
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 still have
a problem.
Sqlite does not appear to be my system:
Traceback (most recent call last):
|
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 Python distribution
(to compile with the new SQLite headers) - this is from Python docs.
Therefore, inclusion of PySQLite in Python-2.5.1 distro effectively
shrinks the Python release cycle to that of SQLite. I would not have
minded, except that...
| |
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 trying to
select a date range and sum those values.
My problem is that it only sums up every other date range and ignores
the in between ranges.
|
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 is
completely independent of the sqlite build. In other words, if your
sqlite build supports full text searching you can use it through the
python sqlite wrapper (that is part of the stdlib) and if it doesn't
then not. This is true for any sqlite...
|
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 aspw
(http://code.google.com/p/apsw/)
You are confused, yes. The sqlite3 package that comes with python2.5
is actually pysqlite2, which interfaces with sqlite3.
Also, sqlite3 and sqlite2 files format are not compatible.
|
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 results.
I downloaded the Windows version of the SQLite3.dll. I didn't know where to
put it so I first put it in its own directory and tried to register it.
That didn't work so I just moved it to the pysqlite directory in
site-packages. That did...
|
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 using a sun machine (I
normally use linux machines) and place this in my lunix home account
would I be able to use python and sqlite?
Any thoughts? I know its a bit of a stretch ...
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
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 we have to send another system
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |