By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,550 Members | 1,189 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,550 IT Pros & Developers. It's quick & easy.

retrieveing data in pysqlite by user input

P: 14
hello everyone

How can i be able to prompt users to query their search about photos Date in which date formate is "2008:12:10". by the way the following codes are hardcoded.
Expand|Select|Wrap|Line Numbers
  1. import os
  2. import sqlite3
  3. from pysqlite2 import dbapi2 as sqlite3
  4. #import Database.py
  5.  
  6. #Retrieving Data from DB
  7.  
  8. connection = sqlite3.connect('Photos.db')
  9. memoryConnection = sqlite3.connect(':memory:')
  10. cursor = connection.cursor()
  11. cursor.execute('SELECT * FROM photos where Date = "2008:10:12 15:19:16 "')
  12. print cursor.fetchall()
Feb 14 '09 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.