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 -- http://mail.python.org/mailman/listinfo/python-list